CS 121

Solutions to homework

Homework 3

Help with JUnit and Unit Testing

Office Hours

I will be in the lab we use (RB 356) from 4pm - 5pm every Thursday. If you need help outside of this time, email me and we'll try to work something out.

How to turn in your homework


In these steps, I'm assuming that you are using eclipse on windows, so if you are not and have questions, you can email me (jacummins@bsu.edu), and I'll try to help.

I think that this is similar to what was done in cs 120 last semester, so you might already know how to do this. So, if you have a different way of exporting your project or connecting to your cs account, that is fine. Just make sure your project is zipped and you use the submit command.

Part 1

First, export your project from eclipse...


Step 1:

Have your project open in eclipse:



Step 2:

Click File, and go to Export:



Step 3:

On the window that comes up, choose "Archive File":



Step 4:

Check all of the projects that you want to export.
Also remember to check the ".classpath" and ".project" boxes.



Step 5:

After "Browse" was clicked, you choose where to export the file, and click "Save".
It helps if you use your name as part of the file name of your archived file.
Something like "lastNameFirstNameProjectName.zip" is good.



Step 6:

After clicking "Save", click "Finish", and hopefully there will be a zipped folder of your project.




Part 2


Now that your project is in a zipped file, time to put it on your bsu-cs account...


To connect to bsu-cs, you can use something like WinSCP and putty. I am using SSH Secure Shell, but you can use whatever you want to.

I'm assuming that you are using windows, but any terminal client and secure ftp program on any operating system that can connect to bsu-cs would work pretty much the same way.

Step 1:

After opening the program, click "Connect":



Step 2:

At this point, enter the host name (cs.bsu.edu or bsu-cs.bsu.edu), and your user name, (mine is "albundy"), and click "Connect".



Step 3:

You'll be prompted for your password, so put it in.



Step 4:

At this point, one side of the window will have your local files on it, and the other will have the files on your bsu-cs account.
Drag your archived file from your local computer to your bsu-cs account



Step 5:

Click the "Open new Terminal Window" Button to open a new terminal window.



Step 6:

Type this command in the terminal window:

/users/albundy/cs121spring08/homework2/tfsubmit lastNameFirstNameProjectName.zip

Where lastNameFirstNameProjectName.zip is the name of your homework that you exported from eclipse.





We will try to use this on each homework, so for homework 3, the command would be

/users/albundy/cs121spring08/homework3/tfsubmit lastNameFirstNameProjectName.zip


Step 7:

Push Enter, and hopefully the screen will show success.