Project 0: Compute square of an int
This is a trivial project designed to show you how to submit
project to Marmoset.
To complete the project, you merely need to change
the body of the Project0.square method to be
return x*x;
, replacing the throw new UnsupportedOperation(...)
statement.
The files contains in the submission are:
- src/Project0.java - the file contains
the implementation of the project. There isn't anything
special about the name of this class or file; but all the
test cases invoke Project0.square, which is contained in this file.
- src/PublicTests.java
The unit tests provided to students are part of the project description.
- src/ReleaseTests.java
The unit tests that comprise the release test of the project.
Normally, the release test code is never given to students,
but is provided here to help you understand how it works.
Students are given limited information about the names of failed
release tests,
and the names can be descriptive or cryptic as desired.
- src/StudentTests.java
Unit tests written by the students. Students are encouraged
to write unit tests (they will find them helpful in completing
the project). An assignment might require that students write
unit tests or achieve a certain amount of code coverage with them.
However, actually measuring whether or not unit tests are good
is an unsolved problem.
- test.properties
Describes several properties of how the submission is to be tested.
It describes the language/framework used for testing the submission,
what version of Java should be used, the names of the TestCase classes,
and whether code coverage should be performed.
- build.xml
An ant build file. This build file allows the project to be compiled
and tested, and can produce zip files containing a submission of the
project and the test-setup. The test-setup is only useful
for instructors, and would not normally be present in a build file
provided to students.
Web Accessibility