Each new lab assignment will be made available by Wednesday morning through the class home page. An electronic copy of the lab will be due the following Wednesday at midnight. To turn in the lab, log in to the UCI Electronic Educational Environment, and upload the requested files following the link you should have for the ICS.H22 class.
Each .java file must include a comment template at the top. This comment should have the following form:
// NAME: Your full name // STUDENT ID: Your UCI student IDUse the following ID for each submission: your UCI ID number '_HW' homework number '_S' submission number (starting with 1). E.G., 12345678_HW3_S1. Only your highest numbered submission will be considered for grading although all copies will be checked for plagerism. Please only submit the .java source code files (not your .class files or .vep files or any other files generated by the compiler).
Each program you submit (on homework, quiz, or the final exam) will be graded on the following components: Program Design, Algorithmic Correctness, Coding Style, Efficiency. You should review each assignment after it is returned to make sure that you understand the reason for any deducted points and can improve your performance accordingly.
Working in the lab is a good idea since help is more readily available there. However, many of you may want to work on your programming assignments from home. You are responisble for installing the necessary software on your own machines. It is not realistic to expect us to provide support for your home installations. Here is the software you will need to get started:
Many people also like to use an integrated development environment (IDE). These provide an editor, compiler, virtual machine and usually other tools, such as a debugger. A relatively easy one to get started with is BlueJ. BlueJ is available on all the machines in the labs and can be downloaded for free from www.bluej.org . There is a very good tutorial available at that web site as well. I will be using BlueJ when presenting and writing code in class.
Identifier | Convention | Examples |
---|---|---|
class names | capitalize first word, capitalize all other words (no underscores) | Circle, FilledCircle, ShadedFilledCircle |
class member names | lowercase first word, capitalize all other words (no underscores) | draw(), drawLine(), centerX, centerY, radius |
function names | lowercase first word, capitalize all other words (no underscores) | findIndex(), factorial(), toLowerCase(), isUpperCase() |
named constants | all caps, use underscores to separate words | PI, MAX_BUFFER_SIZE |
import java.awt.*; /* class Triangle defines a two dimmensional Triangle */ class Triangle { // the x,y coordinates of the origin of this Triangle private int x, y; // draws this Triangle on the display public void draw() { // ... } // inverts this Triangle along a horizontal line public void flip() { // ... } // rotates this Triangle by number of degrees specified by angle public void rotate( int angle ) { // ... } }