|
C M S C 2 1 4 C o m p u t e r S c i e n c e I I S p r i n g 2 0 0 3 |
You send us email. If we think the question is worthwhile we will
The makefile should have several cxx commands that will be able to
No. Each tree's word list is separated from the next tree's word list with
Perhaps my description was not adequate. You look for the word "w". If you
Then submit it WITH dictionary.txt.
Good question! ConstIterator is supposed to walk through a BST, in order.
Because the way you copy a tree is Node by Node.
Since copy is
Although we have been talking about balanced trees in class,
Yes!
Yes, except in test situations where we have explicitly forbid it.
I removed the argument "wheel" from Enigma.h.
No, Parser's constructor can take a Dictionary as an argument.
Look at new information on web page under Task 5.
offset is initially set to 0. augmentOffset() must be called in
You could declare a local variable, cog, and test the Coder * a
Print out each traversal like this:
I reinserted the missing #include in Node.h. Sorry about that, chief!
Absolutely!
You may change that one to void copy(Entry *&, Entry *&);
Make up your own dictionary words and messages and test them. That
is
Only #includes that are necessary for the .h file are included.
In order to test both parts of your program in one "fell swoop" we
Yes, they are supposed to print the string held by each node.
YES! You need to get the newest copies as of 16:05 on March 17.
encipherSpin() and decipherSpin() work on a single wheel. encipher()
and decipher() call these functions 3 times.
Updated YES! The copy constructor was
reinserted in the code.
Updated I originally took it out. It is back
in now.
No, however, you must make the changes to Coder.cpp and Enigma.cpp
and get the Enigma to run correctly because your output from the
Enigma will be your input to the Parser. PROJECT 3 MUST BE
SUBMITTED TO PASS THIS COURSE.
Project #3 is due by 11pm on Thursday, April 3rd,
2003. Note:
any project may be turned in late up to 2 days as specified on the
class syllabus. For details regarding the late policy and any
penalties associated with submitting late projects please see the
class syllabus.
put it in a FAQ. We rarely answer email. Another way is ask the
prof, and again, if it's worthwhile, it goes up here.
compile and link each of the testfiles with the appropriate files
needed such as: cxx -w0 -std strict_ansi testNode.cpp Node.cpp
Be certain to read the Checklist (there is a link to it
at the top of the
P3 web page.)
a blank. Nothing happens if the tree is empty.
can't find it, look for the word "we" try it and go on to the next
word. If the next word is garbage, go back to "we" and add the letter
"a". No word "wea" so try with next letter "wear", Found it. Now try going
forward again to read plaintext. You do ONE WORD AT A TIME and keep track
of everything so you can go back to the word (and maybe even the previous
word) if you are not finding words.
should it not do anything and return the same word?
Or should it return
the first word in the next tree? And if so, what if
it's the last tree as well?
So you need to test for last node in the tree. You have a public setToLastWord()
so I guess I might define a private isLast() or ends() method to
walk to and then halt. You don't have to do anything special with the last
word.
smallest word in the tree or the root?
parameter list of copy() rather than a parameter of type Bst?
private, you can change the arguments any way you want.
BSTs are NOT height balanced, by definition. You would have to use
some other data structure obtain a balanced tree (THUS you do NOT have
to keep your BSTs balanced).
does that mean (++) goes right and (--) goes left?
its parameter named "wheel". Wouldn't this provide a problem with
accessing the data member, Coder array "wheel" in that function?
a function in Dictionary.h: vector<Bst *> getAlphabet();
to access the alphabet and Bst's for words that were read in?
encipherSpin() in order to rotate the wheel by cogX each time a letter
is
to be enciphered/deciphered.
order for Enigma to augment its wheel by its corresponding
cogX (1,2,3) value?
variable passed into encipherSpin(a) to determine if a is pointing to
the
same thing as first, or second, or third and set cog to whichever cogX is needed.
because it does not pass by reference. Any hints?
Remember, you may not change ANYTHING above the word private
in the .h file but may change things below it.
the best way. Remember, as long as your message is separating words so
they
are English words that appear in your dictionary, you should be okay.
such as cctype, etc. Why did you remove them?
The
others belong in your corresponding .cpp file.
are asking you to combine both parts in your main.cpp to be submitted.
main() should encipher/decipher depending upon which letter ('e' or 'd')
appears in the new.primary.input and new.primary.output. If 'd'
(for
decipher) appears (as in new.primary.input), main.cpp will decipher the
message and parse it to get new.primary.output. If 'e' (for encipher)
appears (as in new.secondary.input), main.cpp will encipher the message
and get new.secondary.output. Now your main will test both parts of the
project for purposes of submission.
|
See the class syllabus for policies concerning email Last Modified: Sat Mar 29 08:20 EST 2003 |
|
|
|
|
|