Laboratory 1

Standard Laboratory Procedures

Week of 24 August, 2005

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


This lab has several parts that prepare you for future labs and homeworks.  The goals of this lab are:

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.

If you have any questions, please raise your hand to ask a teaching assistant to help you - this is the purpose of having the lab sections.

Most students will have a basic knowledge of using Windows.  If not, then no problem - just ask a TA for help.  In an effort to keep this lab text (relatively) short, the details about copying files and such have been left out.  The TAs can help with this.


Working in Pairs

Because of the lab scheduling confusion for the first week, you are allowed to work in pairs for this assignment but only if there are no free computers.  However, each person must submit the files under his/her own username.


Home Directory

When you log into the machine, a home directory login will appear.  Log into your home directory using your UVa ID and the appropriate password.  By default your home directory will be mounted as the J: drive.  If your home directory password does not work, or you have forgotten it, see here.

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.


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.

There will be two passwords for CS 101 (unfortunately, we are unable to do one password this semester).  You are welcome to set them to the same thing - however, realize that if you change one, the other will not be modified.  And these passwords are separate from any others (such as for e-mail or your home directory).  For both, your username is the same as your official UVa email ID (abc1d, for example).

The first password is so you can log into the machines in Olsson 001.  This password should have been e-mailed to you; if not, then have a TA log you in using the default account.  Of course, if you are reading this, then you probably have already been logged in... You can change this password by pressing Ctrl-Alt-Del, and selecting "Change Password".

The second password is so you can submit the files for this course.  This 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, you need to change your password.  If that does not work, or 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.

Note that you will also need your home directory password during this lab as well (discussed below).

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 and why 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 web page.  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 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.

This link will allow you to view all of your course grades throughout the semester.  Once an assignment is graded, it will be e-mailed to you, and will then appear on this page.  Note that the grades do not appear on this page before they are e-mailed to you.  Currently, there are no grades to be viewed, however.


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").  Note that if you just click on the file, although it will load up into JCreator, it may not compile correctly.

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.

Note that sometimes JCreator will hang while trying to compile a program.  If so, the lightning bolt button will fix the situation.  Note that this button only lights up when JCreator is compiling a program., and it will be grayed out otherwise.

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 name.  Then save your file (File->Save), compile it, and run it.  If you are working in pairs, put both of your names in the header, and in the System.out.println statement.

Note that all of the ITC labs in the University have Java and JCreator installed, and you are welcome to do your homeworks on those computers.  However, they have an older version of JCreator - although it works the same, the buttons look a little different.

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 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 ( Fill out the survey, then 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.

If you are working in pairs, you must submit the file for both people.

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 will not 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


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.


Finishing Up

This completes the lab.

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