Objective
To become familiar with the cmsc132 resources used during the development
of class projects. Those resources are:
- Eclipse
- CVS Repository
- JUnit Testing
- Submit Server
Grading
- (30%) Public Tests
- (40%) Release Tests
- (20%) Secret Tests
- (10%) Student Tests
Description
- Eclipse - Even if you have used Eclipse before you
should go through the tutorial and Eclipse installation instructions
available at: http://www.cs.umd.edu/eclipse/.
We are using Eclipse 3.5 and a set of plugins (one for project submission and
one for UML design).
- CVS Repository - You will be provided with an CVS
Repository account that will allow you to:
- Retrieve the initial code distribution associated with a
project.
- Work from home and school seamlessly (in case you use two
computers).
- Backup your work.
You can find your CVS Repository account login id and password by
accessing http://grades.cs.umd.edu/. The
following web page:
http://www.cs.umd.edu/class/fall2009/cmsc132/resources/cvsRepositoryAccount.shtml
provides all the information you need to set up a connection to your
CVS Repository account from Eclipse. Keep in mind you only need to do
this once in the semester and once from any computer you plan to use.
Once you have established a connection to your repository, you will be
able to retrieve ("check out") project code distributions. In addition,
any changes to code associated with a project will be transferred to the
CVS Repository (as long as you are connected to the internet). If you
took cmsc131, keep in mind that your old CVS Repository account is no
longer valid.
- JUnit Testing - JUnit is a testing infrastructure that
allow us to write tests for Java code. Every project in this class is
associated with up to four JUnit test modules/classes. Each
module/class includes one or more tests. The modules are:
- PublicTests.java - Java class provided with the code distribution
for a project.
- ReleaseTests.java - Although you don't have access to this class,
you will be able to see whether you pass the tests associated with it
by using the submit server (more information below).
- SecretTests.java - You don't have access to this class.
- StudentTests.java - These are tests you write.
To run a JUnit test in Eclipse choose the JUnit module and select
"Run"→"Run As"→"JUnit Test". If you see a green bar your code
just passed all the tests associated with the module. Otherwise (brown
bar) at least one of the module tests failed. The following link:
http://www.cs.umd.edu/eclipse/EclipseTutorial/JUnitTesting.pdf
provides information on how to create JUnit test modules.
- Submit Server - Each time you submit a project via the
Eclipse "Submit Project" option a copy of the project is sent to the
submit server. Notice that you have a copy of your code in the CVS
Repository and also in the Submit Server (if you have submitted your
project). The Submit server allow us to run public, release, secret, and
student tests. When you submit your project all those tests are run. In
the submit server you will be able to see the results of public tests;
however, you cannot see the results of secret tests. For release tests
you have a limited number of chances (tokens) to see the results. For
example, if a project is said to have three release tokens, that implies
you have three chances in a 24 hour period to test your code. After a
token is used you need to wait 24 hours to use that token again. Notice
that you have to explicitly ask for release testing and release
testing is only available after you have passed all the public
tests. The earlier you start working on a project the more
tokens you will have available.
Keep in mind that we use submit server results to compute part
of the grade associated with a project, therefore you must verify that your
project works in the submit server. Also notice you will receive points
for release tests even if you don't release test your project (e.g., you ran
out of tokens).
Miscellaneous
- In cmsc132 Eclipse projects are created using the project layout option
named "Create separate folders for sources and class files".
- Make sure you use Java 5 or 6 (6 is preferred).
- Remember that methods in a JUnit test module representing tests must be
named starting with the word "test".
- You have three release tokens for this assignment.
- Although you should avoid source lines exceeding 80 characters, you will not be penalize if they are present in your code.
- Any method that you are required to implement will throw the following exception:
throw new UnsupportedOperationException("You must implement this method.");
Remove the above line of code and replace with the appropriate implementation.
-
In this course Which project submission gets graded?
Best submission for a category (ontime or late) is the max of the last compilable version and the best release-tested submission.
-
Even if you don't release test your project or you can't (i.e., you did not pass the public tests) we will run
the release tests and give you credit for them.
-
One of the methods you need to implement computes a prefix sum. Additional information about
prefix sums is available at http://en.wikipedia.org/wiki/Prefix_sum
What you need to do
For this homework you will implement methods of a class named
Utilities. A description of the methods you need to
implement can be found at javadoc. In addition
you should write tests in the in the file named StudentTests.java
(the JUnit test module) which you will find with the code
distribution. Keep in mind that you cannot add any methods to the Utilities
class.
The homework's code distribution is available by checking out the
module named sampleProj.