JMU
logoChemicalc.png
Programming Assignment 8


1 Overview: Chemicalc is a large computational chemistry system. The design phase has been completed and the implementation phase has begun. You must create unit tests for several classes that have been implemented.
2 Background: You will be using a testing framework called jUnit to run the tests. Hence, your test cases must be compatible with this framework. Then, you will use Web-CAT to ensure that your test cases cover all of the statements in the classes being tested.
3 Getting Started: Before doing anything else, you should create a directory/folder (e.g., named pa8) that will hold all of the files for this assignment.

Next, copy working versions of your Atom, Element, Molecule, and StringUtilities classes to your directory for this assignment. If your implementations of these classes are not working, you may use the implementations from the "Solutions" page to modify your implementations, provided that you completely understand those implementations.

Next, copy junit.jar to your directory for this assignment.

Finally you should learn about JUnit. Start by learning about JUnit basics, then decide how you will use JUnit (e.g., from a command shell or from jGRASP) and learn about how to do that.

4 Tasks: You must create four test classes:
StringUtilitiesTest.java
AtomTest.java
ElementTest.java
MoleculeTest.java

These test classes must be designed and implemented in such a way that they ensure that every method, statement and condition in the corresponding class being tested is executed.

You should develop and use these tests in the order they are listed above (since the later classes in this list use the earlier classes in this list).

5 Submitting Your Code: You must submit the classes and test classes using Web-CAT (and the Blackboard attestation process). Your grade on this assignment will be based on the coverage of your test cases.
6 Grading: You will not receive partial credit on this assignment (even though Web-CAT will provide information about the percentage of the code that is covered). If your test cases do not provide 100% coverage you will receive a grade of 0 on this assignment.
Going Further


Copyright 2013