staff - texts - where and when - procedures - policies
| Lecturers | John Chapin | NE43-530 | 253-3538 | jchapin-at-no.lcs.mit.edu |
| John Guttag | 38-401 | 253-6022 | guttag-at-no.eecs.mit.edu | |
| Course Secretary | Kincade Dunn | NE43-529 | 258-5707 | kdunn-at-no.lcs.mit.edu |
| TAs | Laura Dean | lgdean at MIT | ||
| Chris Hockert | 225-9587 | hockert at MIT | ||
| Felix Klock | NE43-630 | 253-7710/876-4448 | pnkfelix at MIT | |
| Lik Mui | NE43-422 | 576-7624 | lmui at MIT | |
| Rob Pinder | rwpinder at MIT | |||
| Christopher Rohrs | 868-5831 | chrohrs at MIT | ||
| Phil Sarin | pdsarin at MIT | |||
| Shan Ming Woo | NE43-527 | 253-6015 | smwoo-at-no.lcs.mit.edu | |
| Mila Zemlyakova | mila at MIT | |||
| Genya Zemlyakova | genya at MIT |
Recitation Section Locations (Thursdays at 10am):
You will be assigned to a recitation based on the sign-up form you
submit; the section assignment made by the registrar is ignored.
| Section | Location | Section | Location | Section | Location |
|---|---|---|---|---|---|
| 1 | 24-407 | 5 | 36-153 | 9 | 1-379 |
| 2 | 36-372 | 6 | 36-144 | 10 | 66-168 |
| 3 | 26-322 | 7 | 13-5101 | ||
| 4 | 26-328 | 8 | 31-161 |
| Individual
Work |
Recitation participation | 4% |
|
| Problem set 1 | 5% | ||
| Problem set 2 | 5% | ||
| Problem set 3 | 8% | ||
| Problem set 4 | 8% | ||
| Problem set 5 | 15% | ||
| Quizzes | 30% | ||
| Group Work | Final Project | 25% |
|
athena% mkdir ~/6.170
athena% fs sa ~/6.170 system:6.170 readYou should then create subdirectories ~/6.170/ps0, ~/6.170/ps1, etc., for the problem sets. All of these subdirectories will automatically inherit the right set of permissions from the parent directory if these steps are performed in the proper order. For example, all of your files regarding the first problem set should be under ~/6.170/ps0.
Failure to put your code online in the proper place will interfere with the operation of our auto-tester, annoy your TA, and potentially lower your grade.
Even if you use your own PC for coding 6.170 problem sets, your code still must also work on Athena, and you must place both your source and compiled code on Athena for testing and grading purposes.
When you start your final project, you will be given a group locker. You may then set the appropriate permission on it to allow your group members access your files. You will get more information on this later.
add 6.170
add -f java
These lines will take effect the the next time you log in to Athena. To make them take effect in the current session, you may also type the same lines at the Athena prompt. Once these lockers are attached, you may access the 6.170 locker through the /mit/6.170 directory.
To write code in Java, you start by writing a Java source file. Java source filenames usually have a ".java" extension. Source files are just text files, which you may create and edit with Emacs or your favorite text editor.
You must compile your source code before running it. The javac compiler is used to transform Java programs into bytecode form, contained in a class file. Class files are recognized by their .class extension. The bytecode in class files can then be executed by the java interpreter.
Extensive on-line documentation for javac, java, and other tools in the JDK can be found through the Java documentation page at MIT (http://web.mit.edu/java/www/home.html).
A Java program consists of one or more packages, each of which defines a group of related abstractions. Each package consists of one or more classes. Each class is produced from a source file that implements the abstractions.
Using javac, one or more source files can be compiled into class files for execution by the interpreter. At least one of the resulting classes must define a method named "main", which serves as the starting point for execution of the program. Once all of the source files have been compiled the program can be run using java, the Java interpreter.
Before using javac, you should add the following lines in your .environment file. These lines will set your CLASSPATH environment variable to include the 6.170-provided class libraries as well as your own generated classes. You will not be able to access the 6.170-provided classes if you do not set your CLASSPATH properly.
if ($?CLASSPATH) then
setenv CLASSPATH ${CLASSPATH}:.:/mit/YOURUSERNAME/6.170:/mit/6.170/class
else
setenv CLASSPATH .:/mit/YOURUSERNAME/6.170:/mit/6.170/class
endif
Running the following line
will generate class files file1.class, file2.class, etc., for each specified source file. Type "man javac" at the Athena prompt for more information on javac options.
Once you have compiled your source code into class files, you can execute
it with the Java interpreter java. The command
java <options> <classsname>
will execute the class indicated by <classname>.
This class must exist in your current CLASSPATH, or you will need to use
the -classpath option to specify a different CLASSPATH. The class
that you execute must also contain the "main" method discussed above.
For a complete description of all of java's options type java
-help at the Athena prompt.
To write to one of these instances, type:
zwrite -i <instance-name>
To unsubscribe, type
zctl delete message <instance-name> \*
To unsubscribe for the current login session only, substitute "unsub" for "delete" in the above line.
The 6.170 instance is intended strictly for questions and answers directly related to problem sets and Java. If you want to start a debate on the aesthetic virtues of Java, for instance, write to 6.170.d instead. The TAs will generally subscribe to the 6.170 instance as long as the signal-to-noise ratio remains high. We will occasionally answer questions on the instances, especially if we see a "not-quite-correct" answer or general confusion. However, if you have a question for a TA, e-mail your TA instead.
For more information on zctl, type "man zctl" at the
Athena prompt.