COS 126

Assignment 0
Programming Assignment


The purpose of this assignment is to introduce you to programming in Java and familiarize you with the mechanics of preparing and submitting assignment solutions. Every week you need to read BOTH the PROGRAMMING ASSIGNMENT and the CHECKLIST.

Your goal this week is to learn to use DrJava for editing programs, javac for compiling them, java for executing them, and Moodle for submitting them.

Hello, World.  The purpose of this step is to set up your computer for developing Java programs.

Programming.  Your job is to write two short programs on your own. We'll assume that you've already created, compiled, and executed HelloWorld.java by following the instructions in the previous part of the assignment.

Writeup.  With each assignment you must submit a text file named readme.txt that is a narrative description of your work. We provide a readme.txt that you should use as a template. Download this file and answer all questions in the space provided. You will need to read the Assignment 0 checklist page, and the COS 126 Collaboration Policy in order to answer the related questions in your readme file. Note that every assignment will have a checklist; make sure to read it each week.

Browsing the course website.  The next part of the assignment is to browse the COS 126 Web pages. The address is:

http://www.princeton.edu/~cos126
Cruise around the COS 126 Web site; it is essential that you understand what's where and how to get to it. Be sure to fill out the online questionnaire.

Submitting the assignment.  The final part of the assignment is to submit HelloWorld.java, HiFour.java, SumThree.java and readme.txt via the Web submission system. To do this, launch your favorite browser and go to the COS 126 web page:

http://www.princeton.edu/~cos126
and select the HelloWorld assignment under Social Activities. After you submit your files, a Run Script button will appear. Be sure to hit it to check your program against our Java compiler. It should compile without errors or warnings; if not, fix the problem and resubmit the appropriate files. To submit a file, you must be registered for the course and know your NetID and OIT Email password.