General Homework Instructions

For the Mathematica assignments in this course, you will be given a project file that will contain several files.  There will be a notebook file (.nb extension) that contains instructions on how to complete the assignment and questions for you to answer.  All your answers and computations should be placed in this notebook unless otherwise instructed. There will also be source files (.m extension) that contain outlines of the code that you will write.  Lastly, many projects will contain test files (.nb extension) to test that your code is correct.

Outline

To complete an assignment, follow the steps below.  For more detailed instructions, see the next section.

Import the assignment into Workbench

Follow the instructions in the notebook file

Finish writing the code in the source files

Test your code by running it against the test suite

Answer any questions in the notebook

Export the completed assignment

You will now practice the steps involved for completing and turning in an assignment. You will be turning in this practice assignment.

Detailed instructions

Import the assignment into Workbench

Download the assignment from the course website.

Launch Workbench

On the menu bar, click File -> Import...

Click the arrow next to the General folder.  Select Existing Projects into Workspace. Do not select “Archive FIle” at this step. Click Next.

GeneralHomeworkInstructions_1.gif

Now Click Select archive file.  Click Browse....  Browse to the location where you saved the downloaded assignment.  Click Finish.

GeneralHomeworkInstructions_2.gif

The Project Explorer View should now show the files and folders in your imported project.  Click the arrow next to the project folder name to expand its contents.  Your Workbench should now look something like this:

GeneralHomeworkInstructions_3.gif

Follow the instructions in the notebook file

To open the notebook file, in the Package Explorer view, click on the .nb file.  Right-click -> Select Run As from the popup menu -> 1 Wolfram.  This will open the notebook file in Mathematica.

Warning: do not simply double-click on the notebook file to open it.  This will open the notebook file but won’t connect it to your code files. In that case you will have to load your code manually and repeat every time you modify your  code. (Yuck!)  When you open the notebook by the Run As menu, all the functions and variables in your source code will be accessible in the notebook.  Furthermore, if you modify your source code, your notebook will automatically load the modifications whenever you save.  (Hooray!)  The Console view keeps a log of the initialization.

GeneralHomeworkInstructions_4.gif

Finish writing the code in the source files

The .m file will contain comments on how to write the missing parts of the code.

Test your code by running it against the test suite. This will be explained separately.

Answer any questions in the notebook

This part is pretty straightforward.  There will be a section header called something like Questions.  Type your answer in the cells below each question.  To create a cell below a question, move your mouse below the question cell until your cursor changes to a horizontal I and left-click. (If you’re a keyboardisto, use the downarrow key.)

Export the completed assignment

On the menu bar, click File -> Export...

Click the arrow next to the General folder.  Select File System. Click Next.

GeneralHomeworkInstructions_5.gif

Click the checkbox next to the project name to select all files to export if the checkbox is not already checked.

Click Browse....  Browse to the location where want to save your completed assignment and name the folder <assignment name>_<LastNameFirstName>, where <assignment name> is the name of the assignment and <LastNameFirstName> is your first and last name using Camel Case capitalization, e.g,. DoeJohn.  Click Finish.

GeneralHomeworkInstructions_6.gif

Created with the Wolfram Language