Calvin seal CS 108: Introduction to Computing
Spring 2006

Electronically Submitting Your Work

Bookmark this page because you'll use these instructions for every assignment (except the "written" ones).

Your Responsibility

The handin program cannot (and will not) check against every naming convention. In particular:

  • The names of JUnit test-case classes absolutely must end in Test.
  • The names of CLI drivers absolutely must end in CLIDriver.

It is your responsibility to read over the assignment.script file to make sure that every JUnit test-case class and every CLI driver was executed. If one is missed, rename the class to conform, and resubmit.

If you don't check, and a JUnit test-case class or CLI driver is missed, you will lose points for not turning in sample executions.

Running the Handin Program

  1. In a terminal window, cd to your Hands on Testing Java folder in your workspace. (See below if this is giving you troubles.)
  2. Execute the handin program:
    unix-% handin108 assignment
    
    where assignment is prelabNN, labNN, or projectNN where each N is a digit.
  3. If you are submitting prelab questions, they will be turned in immediately.
  4. If you are submitting a lab or project, the executables will be executed automatically and put into a sample-execution file, assignment.script.
    • JUnit tests will run, probably too fast for you to watch.
    • Each command-line interface driver will be executed, and you will be prompted for input. You will also be prompted to run the driver again; this allows you to run each CLI driver with different inputs.
  5. The handin program will create a "tarball" and submit it.
  6. Read over all of the feedback on the screen to make sure nothing went wrong.
  7. As cautioned above, read the Scripts/assignment.script file to make sure all of the JUnit test-case classes and CLI drivers were executed. If not, repeat this handin process.

Changing Directories

The Hands on Testing Java is not an easy folder to get to at a command-line prompt. The problem is that the command line does not like spaces in a file or folder name. Fortunately, the command line provides a relatively simple solution.

My Hands on Testing Java is in /home/jdfrens/Eclipse/workspace. When I start a new konsole, I'm already in /home/jdfrens (my home directory). If I execute this command:

unix-% cd Eclipse/workspace/Hands on Testing Java

I'll get an error message because of the spaces in the folder name. There are at least two different ways to solve the problem, I prefer letting the command line figure out its own solution. I type in this:

unix-% cd Eclipse/workspace/Ha

And then I hit the <tab> key. This does a file-name completion. That is, the command line completes the name of the file (or folder) for me.

Your workspace directory is probably different from mine (and that's okay). Just be sure to replace that appropriately.

Fixing Naming Conventions

If you fail to follow some naming conventions, you may discover that some JUnit test-case classes or CLI drivers are not executed. The handin program may tell you directly about other "missing" files.

Some conventions:

  • Spelling, capitalization, and spacing matter.
  • Prelab questions are stored in this folder:
    Prelab Questions
    Watch the spelling, captialization, and spacing of the folder's name. The files in the folder should be named prelab01.txt, prelab03.txt, etc.
  • Exercise questions are stored in this folder:
    Exercise Questions
    Watch the spelling, captialization, and spacing of the folder's name. The files in this folder should be named lab01.txt, lab03.txt, etc.
  • Designs are stored in this folder:
    Design
    Watch the spelling, captialization, and spacing of the folder's name. The files in this folder should be named lab01.txt, project01.txt, lab03.txt, etc.
  • Did I mention that spelling, capitalization, and spacing matter a lot?

Renaming packages, files, and classes is easy in Eclipse:

  1. Select the misnamed item in the Package Explorer.
  2. Right-click on the item.
  3. Select Refactor -> Rename.
  4. Enter in the new name.
  5. Hit OK. Eclipse might ask if it's okay to update other files, and it most certainly is!

If you are told that the item cannot be renamed, then it might need to be moved. If so, you can follow the same instructions but choose Move instead of Rename. You can then select a new location for the item.