Homework

icon Turn in HW7 Homework 7 (Huffman Coding)

Due Tue Aug 15, 11:30pm.
No submissions accepted after Fri August 18, 11:30pm.

Specification:
Provided Files:
Debugging Help:

Remember that in jGRASP you can use a structure viewer to see what your tree looks like. You do so by dragging one of your fields from the debug window outside the window and jGRASP will launch a viewer. This viewer will show you the structure of the tree, but may not show you the contents of the nodes. You can fix this by selecting the wrench icon ("Configure the structure to view mapping"). Under "Value Expressions" say:

_node_.<field>

Where "<field>" is the name of the field you want to view. You can also say:

_node_.<field1>#_node_.<field2>
Helpful diagrams: Your jGRASP debugger won't look exaclty like this, but the characters, frequencies, and positions of nodes in the tree should match.
Links:
FAQ / Help:

icon Turn in HW6 Homework 6 (20 Questions)

Due Thu Aug 10, 11:30pm.
No submissions accepted after Sun Aug 13, 11:30pm.

Specification:
Provided Files:
Debugging Help:

Remember that in jGRASP you can use a structure viewer to see what your tree looks like. You do so by dragging one of your fields from the debug window outside the window and jGRASP will launch a viewer. This viewer will show you the structure of the tree, but may not show you the contents of the nodes. You can fix this by selecting the wrench icon ("Configure the structure to view mapping"). Under "Value Expressions" say:

_node_.<field>

Where "<field>" is the name of the field you want to view. You can also say:

_node_.<field1>#_node_.<field2>
Links:
FAQ / Help:

icon Turn in HW5 Homework 5 (Anagrams)

Due Thu Aug 3rd, 11:30pm.
No submissions accepted after Sun Aug 6, 11:30pm.

Specification:
Required Files:
  • iconLetterInventory.class, a class to help you count, add, and subtract letters from words and phrases
  • iconLetterInventory.jar, JAR archive version for Eclipse
    • For those using Eclipse, you should include LetterInventory.jar in your project. To add the JAR file to your project, select your project, go to the Projects menu and select Properties, then Java Build Path, then Libraries, then click Add External JARs. When you add LetterInventory.jar to the build path, it should work.
    • For those using jGRASP or another basic editor, just put LetterInventory.class in the same folder as your program.

      Sometimes this program produces a lot of output. If you run it in jGRASP, it will display just 500 lines of output. In Windows, If you want to see more, go to the Build menu and select the Run in MSDOS Window option. Then when the window pops up, right-click on the title bar of the window, select Properties, and under the Layout tab you should be able to adjust the Screen Buffer Size Height to something higher (like 9999 lines).

Testing Programs
and Test Cases:
Sample trace :
Links:
FAQ / Help:

icon Turn in HW4 Homework 4 (Grammar)

Due Tue July 25th, 11:30pm.
No submissions accepted after Fri July 28, 11:30pm.

Specification:
Testing Programs
and Test Cases:

  • iconHW4 Grammar Verifier, a web page that lets you paste your sentences and math expressions from your grammar to see if they match the proper format
  • iconRecursion.java, a helper class with a method Recursion.println that lets you print nicely indented output from recursive calls
  • iconTestExpression.java, a short testing program that lets you paste in an expression generated from math.txt and see whether it compiles

Links:
FAQ / Help:

icon Turn in HW3 Homework 3 (Assassin)

Due Thu July 13, 11:30pm.
No submissions accepted after Sun July 16, 11:30pm.

Specification:
Required Files:
Testing Programs
Input Files iconnames.txt, iconnames1.txt, iconnames2.txt, iconnames3.txt
(You can verify the output using the Output Comparison Tool)

or you can download all the files with icona3.zip

Links:
FAQ / Help:

icon Turn in Bonus 1 Bonus Homework 1 (Buggy ArrayIntList)

Due Friday July 14, 11:30pm.
No late days allowed.

Specification:
Starter Files:

icon Turn in HW2 Homework 2 (HTML Manager)

Due Thur July 6, 11:30pm.
No submissions accepted after Sun July 9, 11:30pm.

Specification:
Required Files:
Testing Programs
and Test Cases:
Links:
FAQ / Help:

icon Turn in HW1 Homework 1 (LetterInventory)

Due Thu Jun 29, 11:30pm.
No submissions accepted after Sun July 2, 11:30pm.

Specification:
Required Files

The following programs can be used in place of the Output Comparison Tool.

Future weeks won't have provided tests and you should use the Output Comparison Tool instead as well as write your own tests

Testing Files:

or you can download all the files with icona1.zip

FAQ / Help:

"I need help with my homework!"

Tutorials and Java style guides written by TAs: