CSE 9B Introduction to Computer Science Using C++ (Second Term) UCSD, Fall 1996 Instructor: Walter Savitch Office: 3260 AP&M Instructor Office Hours: First week after classes (Permanent hours will be announced during the first week of classes and will be posted in the public directory of the course computer.) TA Office Hours: will be posted in the public directory of the course computer Lecture: Tuesday, Thursday 10:00-11:20, CENTR 119 Discussion section: Wednesday 1200-12:50 HSS 2250 (Check for details on discussion in lecture.) CSE 9 versus CSE 10: CSE 9A and B together are equivalent to CSE 10. If you have taken CSE 10, you cannot take CSE 9B. If you need CSE 10 for some requirement, then CSE 9 A and B should meet that requirement. Sometimes departments are slow in recognizing this equivalence, so it may take some convincing in certain cases. If you have taken CSE 9A, then you should take CSE 9B, rather than CSE 10. If you need or want to take CSE 10 instead of CSE 9B, see the instructor; that is not advised, but is allowed in unusual circumstances. The Computer Used in this course will be iCSE1 (also called sdcc8). You can access this machine from most, and probably all, terminal rooms on campus. To access this machine via telephone, you will need to obtain a "Basic" account. You may or may not already have a Basic account. If you are new to UCSD this term you should have already been given a Basic account. You need not worry about these Basic accounts (at least not at first), but when and if you want one, go to the Computer Center on the first floor of the AP&M building and ask about obtaining a "Basic" account. You do not need a Basic account to access the class machine from the terminal rooms on campus. To access the class computer via telephone, you need to pay something, either via UCSD or via some commercial net provider. See the following web page for details: http://www-no.ucsd.edu/RAV.html You need a web browser to access this. If this is a problem, check with the Computer Center after the first week of classes. Computer Accounts: You have the same account for CSE 9B as you had for CSE 9A. The password is the same as what you left it as at the end of CSE 9A. If you do not recall your account from CSE 9A, then see either the instructor or the Computer Center Accounts office on the first floor of AP&M. If you have forgotten your password, then go to the Computer Center Accounts office on the first floor of AP&M. They are the only ones who can change your password. If you did not take CSE 9A, then see the instructor about an account. You must have an account for this class on iCSE1 (sdcc8). Homework for this class must be turned from the account you are given for this class. Prerequisite: CSE 9A. Required Texts: (available at UCSD bookstore.) Walter Savitch Problem Solving with C++ : The Object of Programming Addison-Wesley Pub. Co., 1996. You should also have some Unix manual. The books that were required for CSE 9A are all that you need for CSE 9B. You do not need any additional books. Grading: You will be given a series of approximately 8 homework assignments all of which are programming assignments. There will also be one midterm and a final exam. The various items will be weighted as follows in determining your grade: Homework 35% Midterm 30% Final 35% Midterm Date: The midterm is closed book and will be at the regular class time. The midterm will be on or about Thursday February 6, 1997. This date is subject to change so watch for any change of date notice. You must bring a picture ID to the midterms. Working in Teams: You may work in teams of two students. Teams must always consist of no more than two people. You may form different teams for different assignments, but you cannot change team members once you start an assignment. If you prefer, you may do an assignment by yourself even if teams are allowed. Turning in Homework: You will use the turnin program to turnin assignments, the same as in CSE 9A. The late policy is the same as in CSE 9A. The interview system is the same as it was in CSE 9A. In case you forgot the details, they are given below: Using the turnin Program: You turn in your homework from your CSE 9B computer account on iCSE1 (sdcc8); this account will have a name that begins with cs9. Note that some other account on iCSE1 (sdcc8) may not work for turning in assignments. Suppose the program you want to turn in is in the file hw1.cxx. Simply type in the following (while in the same directory as the file hw1.cxx): turnin -c cs9f hw1.cxx Be sure to use all lowercase letters as shown here. Be sure to put spaces where shown. (The number of spaces does not matter). To turn in a file with a name different from hw1.cxx, simply replace the name hw1.cxx in the above example, with the name of the file you want to turn in. Interviews: Most or all assignments will be graded on an interview basis in which a TA will ask you to run your program, explain your program, make changes to the program, and such things. If you do not appear to fully understand your program and the assignment, then you will not get credit for the assignment even if the program is perfect. If you do the assignment in a team, then both members of the team must be present for the interview. If one member of the team seems to understand the program and the other member does not appear to understand the program, then only the one who appears to understand the program will be given credit; the team members receive separate grades for the assignment. Details on times for interviews will be given in class. Note that, even if you will be interviewed on a particular assignment, you still must turn in your assignment by the deadline using the turnin program. The details on this will be discussed in class. Late Policy: You can always turn in your assignment (with the turnin program) up to 24 hours late and receive some (but perhaps not all) of the credit for that assignment. No homework will be accepted more than 24 hours late. The exact rules are as follows: >You can turn in two assignments up to 24 hours late and you will not be penalized for lateness on these two assignments. >If you turns in a third, fourth, etc. assignment after the deadline but at most 24 hours late, then you will receive 80% of the credit you would have receive if you had turned it in on time. Remember, it is better to turn in an assignment before the deadline, but if you miss the deadline, you will still always get some credit if you turn in the assignment within 24 hours of the deadline. No assignments will be accepted more than 24 hours late. In case of sever medical emergencies or such, see the instructor as soon as possible to discuss the situation. Cheating Policies: Cheating has become a serious problem on this campus. A number of students have complained that they are being hurt by others cheating in classes. This is correct. This cheating lowers the value of honestly earned grades. Unfortunately, we have no alternative but to enforce the following very strict rules against cheating. Exams: Anybody talking during an exam will receive a zero for that exam. This may sound unreasonable. However, we have no good alternative. We can easily tell if you are talking, but we cannot listen to and evaluate everything that anybody in the room might say. Anybody found clearly cheating will receive more sever penalties as described below. Programming Assignments: You may not work in groups unless the assignment explicitly says that you may. You must write your own programs. You may discuss the homework with your class mates and seek help from whomever you wish. All that is forbidden is blatant copying. If a question arises, we reserve the right to give you an oral exam on the homework to see if you understand your answer. If you do not understand the assignment, you will receive a zero for that assignment, even if the program you have is perfect in every way. Some of your assignments will definitely be graded in this oral exam way whether or not we suspect cheating. But, if we suspect cheating, we may grade more assignments in this way. If you are caught blatantly copying we will impose more sever penalties as described below. If you are working in a team, then members of the same team may freely communicate and swap information between themselves, but the same rules apply to help from outside the team as those we just described. Penalty for Cheating: Anybody caught clearly cheating in an exam will receive an F IN THE CLASS and will be reported to their Provost's office. For example, if you are caught talking at all in an exam, then you receive a zero for that exam, no matter how innocent the talk. If we are not sure you are cheating, that is the end of that. However, if we hear you giving or receiving answers, then you receive an F for the class. Anybody caught cheating on a homework assignment will receive an zero for that assignment and an additional penalty depending on the details of the case. This additional penalty can range from an additional 10% penalty on your total homework grade all the way up to an F for the class. Note that the penalty is always more severe than just receiving a zero for the assignment in question. Editor: You can use any editor you want Compiler We will be using the CC compiler. This will be the official compiler for this class and all home work will be tested using this compiler. To test that you know how to compile and run a C++ program, use the editor to type the following program into a file named test.cxx (Files to be compiled should end in .cxx. Be sure to space the program as shown here.): #include int main() { cout << "HELLO\n"; return 0; } After you have typed in this program, quit the editor. At the Unix prompt type in CC test.cxx Be sure you use uppercase CC not lowercase cc! If you made a mistake when typing in the program, the compiler will say something like "Warning" or "Compilation failed". If that happens, correct your typing mistakes and try again. If you typed in the program exactly as shown, you will get back the Unix prompt with no message from the compiler. When that happens, you can run your program, by typing in the following at the Unix prompt: a.out When the program runs it will write HELLO to the screen. A Second Compiler There is second compiler that is available to you. It is called the GNU compiler. To compile your program with the GNU compiler simply use g++ in stead of CC. To compile and run the program in the file test.cxx using the GNU compiler you type the following at the Unix prompt: g++ test.cxx This compiles the program. To run the program, you then type: a.out The official compiler for this class is the CC compiler. Be sure that you check all your programs with the CC complier. However, every compiler gives different error messages and you may get more information if you compile your program with both compilers. Code From the Text All the programs in the Savitch text are available to you. You can copy them to your directory and then run them, or change them and run them, or play with them in other ways. The programs are in the directory ../public/programs In this directory you will find a subdirectory for each chapter and the programs are in these subdirectories. We will discuss subdirectories and copying programs in class. Assignments Assignments will be posted in the following directory on the course computer: ../public/assignments Assignment 1 has been posted and is due Tuesday January 14. Assignment 2 is either posted or will be posted very soon. Assignment 2 will be due very soon after Assignment 1. Electronic Mail > Only send email to cs9f on the course computer (from off campus cs9f@icse1.ucsd.edu). This mail will be read by one of the TAs who will either answer the mail or pass it on to the instructor (or discard the mail if it is an unreasonable question). Do not send mail meant for the instructor to wsavitch@ucsd or to any address other than cs9f; if you do, it will simply be forwarded to cs9f thereby delaying your answer. >Only use email for short clarification questions. Do not mail your programs and ask what is wrong with the program. If you cannot figure out or debug your program, make a listing and go see either a TA or the instructor. >Do not expect an immediate answer. We will try to answer all reasonable email questions within 48 hours. Do not send a message the day before the deadline and expect an answer in time to meet the deadline. Internet Access If you have a net browser, some details about this course are available at the following internet address, but you must log onto the course computer in order to get all the information you need for this course. http://www-cse.ucsd.edu/classes/wi97/cse9b If you do not have a net browser or even do not know what a net browser is, do not be concerned; you do not need a net browser or internet access in order to take this course.