CS100, Spring 2000, Project 6 What To Hand In This is the belated fourth of 4 documents for Project 6: 1. Project 6 Write-Up 2. Project 6 Milestones 3. Project 6 Tips --> 4. Project 6 What To Hand In Clarification on the Milestones: In the Milestones, there was this passage: ************************************************************************** * Note: Eventually you will want to organize methods in certain classes. * * For now, they mostly can be static methods in the main/target class. * * Similarly, eventually you will be required to use encapsulation, but * * don't worry about that now. * ************************************************************************** "Eventually" means "in Project 7". What to Hand In: + All the code you have written. (You may omit code you wrote to test your other code, but are not required to omit it.) + Clearly labeled output for each Milestone, as specified below. =============================================================================== Output for Milestone 1 =============================================================================== Note: $print$ is also used in the output for other Milestones. [If you don't get to them, then $print$ table1, table2, table3, table4.] + Without using any variables to help you instantiate it, $print$ this table: 29 -693 -717 -26 -8154 -16 -35 975 5 90886 -731025 -504 8943 -841 95 HINT: Use (an) anonymous array. =============================================================================== Output for Milestone 2 =============================================================================== + Encrypt and then decrypt the message "We Apologize for the Inconvenience" using this key and its inverse abnocdgpwxyefqrstuvhijklmz deqrfgjszabhituvwxyklmnopc + Encrypt and then decrypt the message "Time to feed the chickens, Paw! Ay-yup! Git the lunch bag, Maw!" using this key and its inverse sLvWPdEncFRjQBahOItMzgyxku CpaTQoweZirBYVhlndxSMKuGfj =============================================================================== Output for Milestone 3 =============================================================================== Note: $print$ from Milestone 1 and $distance$ from Milestone 4 are used. + Download the two text files at http://courses.cs.cornell.edu/cs100/2000sp/oldannounce.txt http://courses.cs.cornell.edu/cs100/2000sp/cryptannounce.txt and store them as text files"oldannounce.txt" and "cryptannounce.txt" in the folder for your project. + Create a text file "small.txt" in the folder for your project. Place exactly these 6 lines of text as the contents (delete all the spaces): """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" a- aAa,-aBBA-23-aBC ac-AD-13- -ada--..-Baa-^^bad-cAB-&cb-CDC dab- dad-DADA-dc """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + Create the $Tally$ objects specified below: Tally t1 = new Tally ("a aaa abba abc ac ad ada add baa bad cab cb cdc dab dad dada dc"); Tally t2 = new Tally(new TokenReader("small.txt")); Tally t3 = new Tally(new TokenReader("oldannounce.txt")); Tally t4 = new Tally(new TokenReader("cryptannounce.txt")); Note: $t1$ and $t2$ should contain identical data since "small.txt" is the same string used for $t1$ but with cosmetic changes. + Print the $total$ counts and use $print$ to display the entire tables of unigram tallies of $t1$, $t2$, $t3$, $t4$. + Print the $distance$ between the unigram and bigram tallies for $t1$ and $t2$ and for $t3$ and $t4$. http://courses.cs.cornell.edu/cs100/2000sp/oldannounce.txt + Print the bigram tallies for $t3$. + Print the bigram tallies for $t4$. Note: The output window might be too narrow and too short to show the entire bigram tables -- show as much as you can of each. =============================================================================== Output for Milestone 4 =============================================================================== Note: $distance$ is also used in the output for Milestone 3. + Use $print$ to display tables $table3$, $table4$ and then print their $distance$. =============================================================================== Output for Milestone 5 =============================================================================== + Use $print$ to display $table1$ before and after each swap: print... swap(table1, 0, 3); print... swap(table1, 1, 3); print... swap(table1, 3, 0); print... swap(table1, 1, 0); print... + Use $print$ to display $table2$ before and after each swap: print... swap (table2, 1, 4); print... swap (table2, 1, 4); print...