Project 3: Ciphers S’More

S’More Functionality

NOTE: The S’more is entirely optional and will not be part of your grade in EECS 183. It is for extra practice and fun after completing the regular project.

WARNING: The S’more is not part of your grade. You MUST complete and submit the regular project

Have time for a quick challenge? As we hinted earlier, breaking the Caesar cipher is fairly easy, so long as you can recognize correct English words, since there are only 25 keys you’d have to check. And although computers are very good at quickly encoding characters and going through different keys, they unfortunately understand only 0s and 1s and not ABCs. So in order to tell the computer which words exist and which don’t, we’ll have to provide it a file with all (or close to all) words in the English language.

File Locations

In order to read from a file such as dictionary.txt, you must place it in the correct location.


There are a few things that must be done for Xcode. First, ensure that Derived Data is stored relative to your project folder. Select Xcode > Preferences in the menu bar, click on Locations icon at the top on the window and choose Relative next to Derived Data. This will ensure that executables are saved in your Project folder.

xcode relative

Then, tell Xcode to look for files in the folder where all other project files are stored. From the menu bar, choose Product > Scheme > Edit Scheme.

xcode edit scheme

Select Run on the left, Options on top and then select the checkbox Use custom working directory and navigate to your Project folder where you will store input files.

xcode working directory

Now you can place input txt files right with your .h and .cpp files.

NOTE: If you move your project folder, you’ll have to reset the project’s working directory.

Visual Studio

Fortuately, Visual Studio’s working directory is the project folder itselt. So head to the project folder that is named the same as the project. There should be another folder with that same name. Place the input files in that second folder.

How to Submit

[1] https://launchpad.net/ubuntu/bionic/amd64/wamerican-small/2017.08.24-1