Laboratory 1

Standard Laboratory Procedures

Week of 24 January, 2005

Home | Resources | Homeworks | Slides | Labs | Contacts | Submit | Forums | Private


This lab has several parts that prepare you for future labs and homework. In particular, they

We have created two Java program files that you are to manipulate and then submit as part of this lab. The files are and Their use is discussed later.

Assignment submission

We first want you to become familiar with the Submissions page of the CS 101 website.  We suggest that you do so in a different browser window. You can do so by right-clicking on the preceding link and select "Open in New Window".  The five links on this page allow you to manage and review your assignment submissions for our course.

Your CS 101 email ID is the same as your official UVa email ID (abc1d, for example). Your CS 101 password is set initially to the last 4 digits of your UVa ID number.  By clicking on the Change your CS 101 password link, you can change it to something else.  You will have to enter your email ID, old password, and the new password that you want to use.  For security reasons, it is highly recommended that you change your password.  If you forget your password, you can have it reset by clicking on the Reset your CS 101 password.  The reset requires that you enter your email ID and your full UVa ID number (our single use of the full number in the course).  A random password is then generated and sent to your official UVa email account (e.g., if abc1d is your email ID, then the password is sent to  You can then change the password via the Change your CS 101 password page.

The Submit an assignment link will allow you to submit an assignment.  The submission process is considered below in detail.

All lab assignments, programming assignments, and lab quizzes will have the grade e-mailed to your account.  That e-mail will include the grades for each of the sub-parts of the assignment, and if you did not get full credit, then an explanation why.  Included in the e-mail will be a link to the grading guidelines, which will explain how points were awarded.

If you believe that you deserve more points than given, you will need to fill out a regrade request via the Submit a regrade link.  All lab assignments, programming assignments, and lab quizzes must have their regrades submitted via this script.  All regrades must be submitted within 10 days of when the assignment grade is e-mailed to you.  This 10 day limit is enforced by the regrade system, and the list of assignments that are allowing regrades are listed at the top of the page.  If there is a valid reason why you were unable to submit a regrade during that time, you can speak to the course personnel, but in general, late regrades will not be accepted.  When submitting a regrade, you need to explain why you feel you deserve more points (just saying "I want a higher grade" is not a valid reason)

Exams, which are paper-based, will have a paper-based form to fill out for a regrade. Exam regrades must also be submitted within 10 days of when they are initially returned in class. There will be more on this when the first exam is returned. 

If you lose the e-mail for a previously graded assignment, you can have a new one e-mailed to you.  Because there are not currently any old grades, this form is currently unavailable.  By entering your user ID, password, and selecting the assignment, the appropriate grade is e-mailed to your account.

If you are unable to complete the lab during the normal lab session, you can get an extension via the Request a lab extension link.  This link allows you to finish the lab within the next 24 hours on another computer (home, school computer, etc.).  There is no penalty if you are not able to finish the lab during lab session.  To get an extension you MUST submit all the files that you have completed so far (even if they don't work!) before you leave lab.  If you do not do this, you will not get credit for the lab.  There are no exceptions to this policy.


Home Directory

Each lab you will need to start up the Home Directory Service on your lab machine. Do not use the web interface! That interface does not provide access for JCreator to your files. On the desktop there is a Home Directory Service icon. Double click the icon to start up the service and then logon using your official UVa ID number and the appropriate password.

By default your home directory will be mounted as the J: drive.

You can install the home directory service on your home machine as well - see

All your submitted files must be copied to your home directory before the due date of the assignment.  If there is a problem with the submission, then only the copy in the home directory will be considered to resolve the issue, and only if it was copied there before the assignment was due.

If your home directory password does not work, or you have forgotten it, see here.

Introduction to Java and JCreator

Put a copy of in your Home Directory folder by right clicking on the link and select "Save Link As" or "Save Target As").

Next load the file into JCreator. You can do so, by either double clicking on the copy of in your Home Directory folder, or by starting up JCreator and then select the Open entry of the File menu (i.e., select File>Open) and find the file.  While this lab does not discuss the various parts of the program mean, please examine the two lines that start with System.out.println. Each of them prints out a line of text.

Press the compile button at the top of the window, which is shown highlighted in the image on the right. This will start the compilation of the Java program.  All Java programs must be compiled before they are run.



The bottom of the screen will show the status of the compilation, as shown in the next image.


If there were any errors, they would be reported there.  "Process completed" means it compiled without any errors.

Next, you can execute the program.  To do this, press the execute button, which is shown highlighted below.

This will pop up a black window, as shown below.  This window shows the output produced by the execution of the program.  For this program, it shows the two lines printed via the two System.out.println lines in the program code.

Now edit the file in JCreator, and change the email address in the header and the name entries in the header and second System.out.println line to your own.  Then save your file (File->Save), compile it, and run it. If necessary correct any errant typing until the program successfully compiles and runs (i.e., the program displays your name).

Submitting the file

We want you to submit the file, so click on the Submit an assignment link.  Again, it will probably be easier to open up the page in a new window (right-click on the link and select "Open in New Window"). 

The submission form will often have a few survey questions to fill out.  These questions are there so that we know how we are doing, and will ask things such as how useful you felt the assignment was, how long it took, etc.  For this lab, there is only one question, "How well did you understand the concepts gone over in this assignment".  Select the appropriate answer.  There is also a comments box, where you can optionally state any remarks that you have about the assignment.  We are interested in this anonymous feedback, and will read each of the comments and try to use them to improve the next course offering.  Note that only one set of answers is recorded per person per assignment.  Thus, you don't need to give a different set with each file you upload.  If you do give a new set of answers, your old set will be overwritten.

The process to submit a file is as follows. Enter your e-mail ID and password, select the assignment ( Lab 1), and click on "Browse..." to select the file to submit.  This will pop up a window that will allow you to find the file you want to submit ( Lastly, click on the "Upload" button at the bottom.  If there is a problem with the submission, it will state so.  Otherwise, it will tell you that your submission was successful.

Checking the submission and its compilation status

You can check which files have been submitted. To do so, make sure the User ID and Password fields are filled out, and select the correct assignment (Lab 1) from the Assignment selection box.  Then click on "List".  This will list the file(s) submitted for this assignment.  Note that the assignment is currently incomplete, shown by the blinking red "file not found", as only one of the two required files has been submitted so far (the second will be submitted below).  The listing will also show the code for the file(s) that have been submitted.  If you do not submit all the files, you are liable not to receive full credit for the assignment.

Next, make sure the User ID and Password fields are filled out, and select the correct assignment (Lab 1) from the Assignment selection box.  Then click on "Compile".  This will compile the file(s) submitted.  Doing this compilation is important, as it will check to see if there are any errors.  If your submission does not compile, you are liable not to receive full credit for the assignment.  Thus, it is in your interest to make sure that all submitted files successfully compile. Because only one of the two files has been submitted, this compile check will also state that one file is missing.

The second file

Put a copy of in your Home Directory folder.  Load it up into JCreator, and compile it. It will show a compile error when you do so, as shown below.  Do not fix this bug yet!

The display will indicate that a semicolon is missing (i.e. Java expected it to be there) from the, line 7.  If you look at the file, there is no semicolon at the end of the line.  Do not fix this bug yet!

Submit the file via the Submit an assignment link.  There is no penalty for submitting a file multiple times, and only the final submission is considered.  Thus, if an earlier submission has errors (as this one does), as long as those errors are corrected before the assignment is due, there is no penalty.

List the assignment.  Note that both the required files have now been submitted.

Next, compile the assignment.  Note the error messages for the file, indicating that the file did not compile.

Back in JCreator, add in the semicolon at the end of line 7.  Change the headers to your name and e-mail address, and submit the file.  If you compile it again, you will notice that there were no compile errors.

Submit the corrected file.

Now list and compile the submitted version - it should show that both of the received files compile.

Java and JCreator Installation

Students often find it convenient to install Java and JCreator on your their machines -- they do not have to go to UVa public lab. The installation is not required as all UVa public machines have both tools installed.

If you choose to install the software, please realize that we cannot provide support for this activity. 

Links to download the software are on the Resources page of the website.  For the tools to install correctly you need to install Java BEFORE you install JCreator. So first download and install Java, then download and install JCreator.

If your home machine does not have a fast Internet connection, you can download copies in lab and burn the copies to a CD. The lab personnel have a limited number of free CDs.

This discussion completes the lab.

Be sure to log out! No need to restart the computer, though.