Skip to content
Snippets Groups Projects
Commit 06ac6209 authored by Adam Blank's avatar Adam Blank
Browse files

Merge branch 'master' of gitlab:cse332-15au/p1

parents 982a766d 4fa1021e
Branches master
No related tags found
No related merge requests found
## CSE 332 Project 1: Spell Checker ##
The purposes of this project are
* to review Java,
* to implement various "WorkList" data structures,
* to demonstrate a useful abstraction, and
* to compare efficiencies of recursion and iteration.
-----
### README ###
This document provides a **short** overview of what you will complete in this project. The full specification can be found on the course website.
### Checkpoints ###
**Checkpoint 1:** By Tuesday, October 06, you should have completed: (1), (2), (3)<br>
**P1 Due Date:&nbsp;** By Monday, October 12, you should have completed: (4), (5), (6), (7)
-----
### Part 1: Implementing Simple WorkLists ###
In this part, you will write two simple implementations of the `WorkList` ADT.
**(1) Implement `ArrayStack`.**<br> `ArrayStack` is a `WorkList` implementation that stores the work in LIFO order and uses an `Array` as the underlying data structure.
**(2) Implement `ListFIFOQueue`.**<br> `ListFIFOQueue` is a `WorkList` implementation that stores the work in FIFO order and uses a `LinkedList` as the underlying data structure.
### Part 2: Implementing Advanced WorkLists ###
In this part, you will implement two more `WorkList`s.
**(3) Implement `RandomizedQueue`.**<br> `RandomizedQueue` is a `WorkList` implementation that stores the work in a random order. `RandomizedQueue` is a fixed size buffer.
**(4) Implement `StackQueue`.**<br> `StackQueue` is a `WorkList` implementation that stores the work in FIFO order and uses two `ArrayStack`s as the underlying data structures.
### Part 3: Using Your WorkLists ###
In this part, you will implement several backtracking algorithms using a
generalized framework. The framework uses `WorkList`s instead of recursion.
**(5) Subset Sum.**<br> You will familiarize yourself with the "subset sum"
problem, read a solution to it that does not use the backtracking framework,
and write a solution to it that does use the framework.
**(6) Edit Distance.**<br> You will familiarize yourself with the "edit distance" problem and write a solution to it that uses the framework.
### Part 4: Write-Up ###
**(7) Write-Up.**<br> Fill out answers to the questions in `writeup/WriteUp.md`.
A large portion of your grade is filling out answers to the questions in this
write-up. Make sure to fill it out!
\ No newline at end of file
......@@ -14,7 +14,7 @@ import problems.EditDistanceProblem;
public class SpellChecker {
private WordDictionary dictionary;
public SpellChecker(String filename) {
public SpellChecker() {
this.dictionary = new SetDictionary("dictionary.txt");
}
......@@ -38,7 +38,7 @@ public class SpellChecker {
public static void main(String[] args) {
System.out.println("Pre-Processing...");
SpellChecker sp = new SpellChecker("big.txt");
SpellChecker sp = new SpellChecker();
String[] words = new String[]{"hlelo", "actulay", "amke"};
System.out.println("Starting Tests...");
long start = System.currentTimeMillis();
......@@ -51,4 +51,4 @@ public class SpellChecker {
long end = System.currentTimeMillis();
System.out.println("Took " + (end - start));
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment