Announcements
|
|||||||||||||||||||||||||||||||||||||||||||||
|
Go green: Fix the power management parameters on your computer. Go to this website to find out how to fix your power-management features on your computer and save up to 1/2 ton of CO2 and $60.00 a year. http://www.powerdownfortheplanet.org/ Cornell has signed on to this Climate Savers initiative and is taking part in a "university challenge" to sign up students, staff, and faculty. Take the pledge on the website! Tell your friend and enemies about this. A3: Notes on function isSibling. The A3 handout says that function isSibling must be written so that it calls one of the two previous functions of the assignment. This requirement is there to help you become aware of using previously written functions in order to save time and effort. However, in this case, the savings are so miniscule and the additional confusion in trying to use them are so great that we are removing this requirement. Hence, your function isSibling may or may not call the other two functions; it is up to you to make that decision. Please watch out for this case: in the call v.isSibling(w), if v and w have no predecessor, they are not siblings. A3: Testing the static population variable. Note the following about a static variable, for example one declared like this:
Whenever you compile, pop is recreated and its value is set to the default value 0. Variable pop then exists until the next time you compile. Any clicks of the Test button or statements/expressions you put in the DrJava interactions pane may affect it —may change its value. The consequence of this is that you have no idea what the value of pop is before execution of
so you don't know what value to use for the <expected value>. So how can you test that the constructor added 1 to pop? This problem has an extremely simple solution. It is best that YOU find the solution rather than having us tell you, for this problem is similar to problems that arise all the time in programming. We try to help you by giving you some facts and questions. 1. Your goal is to use an assertEquals procedure-call to test whether execution of Virus x= new Virus(...); adds 1 to pop, so the difference of pop after and before this statement should be 1. 2. You can write a statement that gives you the value of pop just before executing Virus x= new Virus(...); . (How?) 3. The second argument of a call to assertEquals does not have to be getPop(). It can be any expression. So, think "out of the box" a bit, and just write some expression that helps you see that 1 was added to pop. About the conditional expression. You can find out about the conditional expression in the ProgramLive CD that comes with the text --look in the index or glossary. Here is an example of a conditional expression:
It's value is calculated as follows. if x > 0, use the value of the expression x; if x <= 0, use the value of the expression -x. The general form of the conditional expression is: ( booleaan-expression ? expression1 : expression2 ) It is evaluated as follows: if the boolean-expression evaluates to true, use the value of expression1 as the value of the expression; otherwise, use the value of expression2. About assignment A1. Assignment A1 may be done in groups of two people. But this may be done ONLY if you "group" each other on the CMS. DO THAT NOW. One person invites the other, and then the other person responds. If you don't do this and you work together, we have all sorts of administrative headaches. SO GROUP SOON! Here are the procedures for working in groups. Both of you always work together, taking turns driving (using the keyboard and mouse). No one ever works on the program alone, without the other person there, helping. It is academic fraud for you to each do part of the work independently. MASTERY. Assignment A1 requires mastery: you submit and we grade; you revise and resubmit and we regrade; ...; this goes on until the assignment is OK. Everyone gets full credit for this assignment. But we want this processed finished in one week, which means that you and the grader have to respond very quickly to submissions and grading actions. For this to happen in a timely fashion, two things must occur. 1. You MUST set your notifications on the CMS so that you receive an email whenever an assignment is graded. On the CMS, click the "Notifications" link near the bottom of the blue column of links; on the page that opens, do the necessary. 2. Whenever you resubmit the assignment, ALSO ASK FOR A REGRADE. We can easily tell that the assignment has been submitted only if you ask for a regrade. VideoNote. net. CS1110 is participating in a pilot project. Each 11:15 lecture is being videotaped, and this videonote appears soon thereafter on the website www.videonote.net/. Along with the video is a table of contents and notes, which can be used to zero in on particular places within the video ---click a link in the notes and the video switches to the corresponding spot. This service is being provided free this semester. In return, we will be asking you to fill out a survey or 2 or 3 during the semester about its use. We want to see how useful this service is, whether it improves performance, whether it reduces attendance in class (please continue to come!!!), and so forth. One-on-one sessions. In the week of 2 February, and perhaps a few days of the next week, we will attempt to give each student a 1/2-hour one-on-one session with an instructor, a TA, or experienced consultant. This session does not count toward your class grade; it is offered simply to help you. We will try to schedule enough sessions so that each student can have one, but we have 200 students, and that is a lot to cram into one week. Students who have experience programming can help out by waiting a while before selecting a session to give those with no experience more chance to have a session. In the session, you will be asked some questions. Then, the instructor will ask you to develop a small class in DrJava. The instructor will help, give pointers and advice, answer your questions, and make comments as you proceed. Sign up for a one-on-one session in the course CMS. If you have trouble and need help, email someone, but the CMS should be self-explanatory. A dozen students already signed up less than 24 hours after the one-on-one session was added to the CMS and before anyone was told about it. Note that few of the one-on-one instructors have created their sessions on the CMS; we expect that will be done soon. About the Inauguration. Tuesday is inauguration day, and some of you may want to be elsewhere, at least during the swearing-in ceremony, which starts at 11:30AM. The swearing-in has to be finished by noon because that's the end of Bush's presidency. Feel free to come to the 9:05 lecture instead of the 11:15 lecture this Tuesday, no matter which lecture you are registered for. Perhaps, during the 11:15 lecture, we'll be able to see the actual swearing-in on the internet and show it in class. This first lecture is important. We will talk about Java expressions and
the assignment statement --using a Java application mainly as a calculator.
Then, you will attend a lab on Tuesday or Wednesday where you will practice
with these. It would be good for you to download the pdf file for the first lecture, find out what the reading is, and study it a bit. Secondly, download the lab for Tues-Wed of this week and look it over. This will make the lab easier. 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: cms.csuglab.cornell.edu/. Fix your PCs so that extensions (like .java and .doc) ALWAYS appear. How you do this depends on your operating system. This website tells you how to do it in most of the Microsoft systems: This website tells you how to do it in Vista
Summaries of lectures Seeing consultants, TAs, Lee, and Gries 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 and answers email and often. Feel free to see Lee during her office hours or to send her email. If she's in her office with the door wide open and she is not in a meeting, she can talk to you then, too. 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 course staff. 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 CS1110 live in the 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.
|
||||||||||||||||||||||||||||||||||||||||||||