[an error occurred while processing this directive]
CIS 110

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. Your goal this week is to learn to use DrJava for editing, compiling, and executing programs.

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.

Remember that every file you submit needs to have your name, PennKey and section number.

Style.  Programming languages are less forgiving than human languages of typos and small errors, but there are still many ways to correctly format the same program. Some are more readable than others. For this course, you should make sure your code follows our style guide. It takes practice to develop good coding style, so we will give style feedback on your assignments. We will also get progressively stricter on deducting points for poor style. You will almost certainly receive deductions for style as well as logic errors on multiple assignments throughout the semester. That's normal, especially since you can't test for style errors the way you can test for logic errors.

Note that some of our style guidelines seem arbitrary. In fact, there are many opinions about what constitutes "good style," and each company typically has its own rules. But one rule that everyone agrees on is the importance of consistency. For that reason, we have adopted the textbook's style guidelines for the course. The two style rules you should focus on in this assignment are correct file headers and indentation. Every company and project has their own template for file headers, but like consistency, everyone agrees on their importance. The same is true of indentation. Dr. Java will indent your code for you. There is no excuse for inconsistent indentation!. Just hit TAB to reindent your current line of code, or select a section of code and hit tab to re-indent all the selected lines. It's a good habit to hit TAB before you start typing on any line so that it is correctly indented. If Dr. Java auto-indents your code in a way you don't expect, you probably have a logic error. Usually, you are missing a semi-colon or curly brace on an earlier line.

Writeup.  With each assignment you must submit a text file. We provide a readme_hello.txt that you should use as a template. Each assignment will have its own template. Download this file and answer all questions in the space provided. You will need to read the CIS 110 Collaboration Policy in order to answer the related questions in your readme file.

Browsing the course website.  The next part of the assignment is to browse the CIS 110 website. The address is:

It is essential that you understand what's where and how to get to it.

Creating a SEAS account.  In order to use the Moore computer labs, you must have a SEAS account. If you are an e-mail address ending in seas.upenn.edu you already have one. If not, fill out the form here to request a SEAS account.

Registering for the Piazza discussion board.  Next you should register for the CIS 110 discussion board on Piazza. This will be the main on-line forum for discussing assignments and course material, and interacting with other students and staff. We will also post course-wide announcements on Piazza (which will be e-mailed to the address you provide).

Submitting the assignment.  The final part of the assignment is to submit HelloWorld.java, HiFive.java, SumThree.java and readme_hello.txt via the web submission system. To do this, click the Homework link from the course website, and click on Submit Your Homework. If you aren't already logged in, login using your PennKey. You can submit as many times as you like, but only the last version of each file that you submit will be graded (if you've already submitted a file, you can safely leave that field blank on future submissions unless the file changes). Your submission time will be the submission time of the last file you submit.

Getting help. All assignments include a checklist with answers to common questions and help getting started. Always read the checklist carefully before starting the assignment. If anything is unclear, don't hesitate to drop by office hours, post to Piazza, or email us.