Create Project Directory
To help keep our SomewhatSimplifiedSolitaire code and other files organized, first create a project directory, which will eventually contain all of your source and test code for your project along with other documents. Since we require GitHub repos for submissions, your project directory would go within the repo directory
Within the project directory, create the following directories, which will help organize and separate your files into:
src
(source) code,test
(test) code,lib
(library) files,bin
(compiled.class
) files,doc
(generated Javadoc) files, andproject_docs
(project document) files (e.g., Black Box Test Plan)
For example, assuming your assigned repo is csc116-001-Lab10B-33
:
% pwd
/afs/unity.ncsu.edu/users/j/jdyoung2/csc116/csc116-001-Lab10B-33
% mkdir Solitaire
% cd Solitaire
% mkdir src test lib bin doc project_docs
% ls
bin lib src
doc project_docs test
Download Starter Files
- Download
SomewhatSimplifiedSolitaire.java
file into yoursrc
directory. - Download
SomewhatSimplifiedSolitaireTest.java
file into yourtest
directory.
Download JUnit Libraries
JUnit is not provided in the default Java libraries (String
, Scanner
, etc. are provided with Java). Instead, we have to download the JUnit libraries.
- Browse to the JUnit Github project, and download
junit-4.12.jar
into yourlib
directory in your project. - Also download
hamcrest-core-1.3.jar
into yourlib
directory in your project.
Both junit-4.12.jar
and hamcrest-core-1.3.jar
are required to run test cases from the command line.