To become familiar with the cmsc132 resources used during the
development of class projects and to review basic Java constructs.
The class resources are:
- CVS Repository
- JUnit Testing
- Submit Server
This project is considered an open assignment. Please see the
Open/Close Policy for additional information.
- (30%) Public Tests
- (40%) Release Tests
- (20%) Secret Tests
- (10%) Student Tests
- 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/.
Make sure the Eclipse version you have corresponds to the one in
the installation instructions. Also make sure the project submission plugin
is part of your Eclipse installation.
- CVS Repository - You will be provided with an CVS
Repository account that will allow you to:
- Retrieve the initial code distribution associated with a
- Work from home and school seamlessly (in case you use two
- Backup your work.
You can find information about your CVS Repository account at:
This page 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
- 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:
provides information on how to create JUnit test modules.
- Submit Server - 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).
In this course, after you received a grade for project, you are welcome to see a TA
during office hours to find out additional information about release and secret
tests you may have failed.
- 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 8.
- Create a new workspace for cmsc132 (you only have to do this once in the semester). Do not use
the same workspace you used in cmsc131. To create a new workspace in Eclipse select "File" → "Switch Workspace".
- Remember that methods in a JUnit test module representing tests
must have the @Test annotation (see PublicTests.java for examples).
- 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.
- In this course we may provide shells for methods you are expected to implement.
If that is the case, the body of the method 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.
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.
- Follow the style described at Style Guidelines.
What you need to do
For this project 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 public methods to the Utilities
class (adding private methods is fine).