Commit 0c589adf authored by Adam Blank's avatar Adam Blank
Browse files

Initial commit

parents
No related merge requests found
Pipeline #24660 canceled with stage
Showing with 893 additions and 0 deletions
+893 -0
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
data/*
A:
script: /testers/cs2/project01/plaintext/test
B:
script: /testers/cs2/project01/suite/test
C:
script: /testers/cs2/project01/suite/test
D:
script: /testers/cs2/project01/suite/test
<component name="libraryTable">
<library name="com.github.javaparser:javaparser-core:3.5.12" type="repository">
<properties maven-id="com.github.javaparser:javaparser-core:3.5.12" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/github/javaparser/javaparser-core/3.5.12/javaparser-core-3.5.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="org.hamcrest:hamcrest:2.2" type="repository">
<properties maven-id="org.hamcrest:hamcrest:2.2" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest/2.2/hamcrest-2.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="org.hamcrest:hamcrest-core:2.2" type="repository">
<properties maven-id="org.hamcrest:hamcrest-core:2.2" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/2.2/hamcrest-core-2.2.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest/2.2/hamcrest-2.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="org.junit.jupiter:junit-jupiter:5.6.0-M1" type="repository">
<properties maven-id="org.junit.jupiter:junit-jupiter:5.6.0-M1" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter/5.6.0-M1/junit-jupiter-5.6.0-M1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-api/5.6.0-M1/junit-jupiter-api-5.6.0-M1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-commons/1.6.0-M1/junit-platform-commons-1.6.0-M1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-params/5.6.0-M1/junit-jupiter-params-5.6.0-M1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-engine/5.6.0-M1/junit-jupiter-engine-5.6.0-M1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-engine/1.6.0-M1/junit-platform-engine-1.6.0-M1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/project01-ciphers.iml" filepath="$PROJECT_DIR$/project01-ciphers.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../../.." vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="a54a20fd-6e73-4eb7-8984-7c0390a4382f" name="Default Changelist" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Class" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1W2n7smasjBh2n8iaohE2fGjHkp" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showExcludedFiles" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="Downloaded.Files.Path.Enabled" value="false" />
<property name="Repository.Attach.Annotations" value="false" />
<property name="Repository.Attach.JavaDocs" value="false" />
<property name="Repository.Attach.Sources" value="false" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../project01-ref" />
<property name="project.structure.last.edited" value="Libraries" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.2" />
</component>
<component name="RecentsManager">
<key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
<recent name="edu.caltech.cs2.project01" />
</key>
</component>
<component name="RunManager" selected="Application.SubstitutionCipherSolver">
<configuration name="CaesarCipherSolver" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="edu.caltech.cs2.project01.CaesarCipherSolver" />
<module name="project01-ciphers" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="SubstitutionCipherSolver" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="edu.caltech.cs2.project01.SubstitutionCipherSolver" />
<module name="project01-ciphers" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="B Tests" type="JUnit" factoryName="JUnit">
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="tags" />
<option name="PARAMETERS" value="" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="wholeProject" />
</option>
<tag value="B" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="C Tests" type="JUnit" factoryName="JUnit">
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="tags" />
<option name="PARAMETERS" value="" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="wholeProject" />
</option>
<tag value="C" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="D Tests" type="JUnit" factoryName="JUnit">
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="tags" />
<option name="PARAMETERS" value="" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="wholeProject" />
</option>
<tag value="D" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="Application.CaesarCipherSolver" />
<item itemvalue="Application.SubstitutionCipherSolver" />
<item itemvalue="JUnit.D Tests" />
<item itemvalue="JUnit.C Tests" />
<item itemvalue="JUnit.B Tests" />
</list>
</component>
<component name="ServiceViewManager">
<option name="viewStates">
<list>
<serviceView>
<treeState>
<expand />
<select />
</treeState>
</serviceView>
</list>
</option>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="a54a20fd-6e73-4eb7-8984-7c0390a4382f" name="Default Changelist" comment="" />
<created>1578356392291</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1578356392291</updated>
</task>
<task id="LOCAL-00001" summary="Add random and constructor comments">
<created>1578381719009</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1578381719009</updated>
</task>
<task id="LOCAL-00002" summary="Add getSolution method">
<created>1578382759837</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1578382759837</updated>
</task>
<task id="LOCAL-00003" summary="Add empty plaintext file">
<created>1578382823193</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1578382823193</updated>
</task>
<task id="LOCAL-00004" summary="Add main for SubstitutionCipherSolver">
<created>1578383680358</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1578383680358</updated>
</task>
<task id="LOCAL-00005" summary="Slight fix">
<created>1578383740835</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1578383740835</updated>
</task>
<task id="LOCAL-00006" summary="Add run configurations for solvers">
<created>1578383920498</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1578383920498</updated>
</task>
<task id="LOCAL-00007" summary="Change line to reuse cipher&#10;&#10;cipher should randomly gen key within getsolution">
<created>1578385728296</created>
<option name="number" value="00007" />
<option name="presentableId" value="LOCAL-00007" />
<option name="project" value="LOCAL" />
<updated>1578385728296</updated>
</task>
<option name="localTasksCounter" value="8" />
<servers />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="Add random and constructor comments" />
<MESSAGE value="Add getSolution method" />
<MESSAGE value="Add empty plaintext file" />
<MESSAGE value="Add main for SubstitutionCipherSolver" />
<MESSAGE value="Slight fix" />
<MESSAGE value="Add run configurations for solvers" />
<MESSAGE value="Change line to reuse cipher&#10;&#10;cipher should randomly gen key within getsolution" />
<option name="LAST_COMMIT_MESSAGE" value="Change line to reuse cipher&#10;&#10;cipher should randomly gen key within getsolution" />
</component>
<component name="WindowStateProjectService">
<state x="96" y="0" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1578383867679">
<screen x="0" y="0" width="1280" height="680" />
</state>
<state x="96" y="0" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1280.680@0.0.1280.680" timestamp="1578383867679" />
<state x="446" y="51" key="#com.intellij.ide.util.MemberChooser" timestamp="1578384131575">
<screen x="0" y="0" width="1280" height="680" />
</state>
<state x="446" y="51" key="#com.intellij.ide.util.MemberChooser/0.0.1280.680@0.0.1280.680" timestamp="1578384131575" />
<state x="438" y="201" width="404" height="287" key="#com.intellij.refactoring.move.moveClassesOrPackages.MoveClassesOrPackagesDialog.classes" timestamp="1578356533156">
<screen x="0" y="0" width="1280" height="680" />
</state>
<state x="438" y="201" width="404" height="287" key="#com.intellij.refactoring.move.moveClassesOrPackages.MoveClassesOrPackagesDialog.classes/0.0.1280.680@0.0.1280.680" timestamp="1578356533156" />
<state x="409" y="9" width="586" height="567" key="CommitChangelistDialog2" timestamp="1578385727653">
<screen x="0" y="0" width="1280" height="680" />
</state>
<state x="409" y="9" width="586" height="567" key="CommitChangelistDialog2/0.0.1280.680@0.0.1280.680" timestamp="1578385727653" />
<state x="71" y="10" width="1220" height="811" key="CommitChangelistDialog2/0.0.1575.846/1920.-150.2101.1142@0.0.1575.846" timestamp="1578365474289" />
<state x="462" y="143" key="FileChooserDialogImpl" timestamp="1578384143760">
<screen x="0" y="0" width="1280" height="680" />
</state>
<state x="462" y="143" key="FileChooserDialogImpl/0.0.1280.680@0.0.1280.680" timestamp="1578384143760" />
<state x="569" y="178" key="FileChooserDialogImpl/0.0.1575.846/1920.-150.2101.1142@0.0.1575.846" timestamp="1578363238157" />
<state width="1237" height="168" key="GridCell.Tab.0.bottom" timestamp="1578383924915">
<screen x="0" y="0" width="1280" height="680" />
</state>
<state width="1237" height="168" key="GridCell.Tab.0.bottom/0.0.1280.680@0.0.1280.680" timestamp="1578383924915" />
<state width="1532" height="258" key="GridCell.Tab.0.bottom/0.0.1575.846/1920.-150.2101.1142@0.0.1575.846" timestamp="1578365476871" />
<state width="1237" height="168" key="GridCell.Tab.0.center" timestamp="1578383924915">
<screen x="0" y="0" width="1280" height="680" />
</state>
<state width="1237" height="168" key="GridCell.Tab.0.center/0.0.1280.680@0.0.1280.680" timestamp="1578383924915" />
<state width="1532" height="258" key="GridCell.Tab.0.center/0.0.1575.846/1920.-150.2101.1142@0.0.1575.846" timestamp="1578365476871" />
<state width="1237" height="168" key="GridCell.Tab.0.left" timestamp="1578383924915">
<screen x="0" y="0" width="1280" height="680" />
</state>
<state width="1237" height="168" key="GridCell.Tab.0.left/0.0.1280.680@0.0.1280.680" timestamp="1578383924915" />
<state width="1532" height="258" key="GridCell.Tab.0.left/0.0.1575.846/1920.-150.2101.1142@0.0.1575.846" timestamp="1578365476871" />
<state width="1237" height="168" key="GridCell.Tab.0.right" timestamp="1578383924915">
<screen x="0" y="0" width="1280" height="680" />
</state>
<state width="1237" height="168" key="GridCell.Tab.0.right/0.0.1280.680@0.0.1280.680" timestamp="1578383924915" />
<state width="1532" height="258" key="GridCell.Tab.0.right/0.0.1575.846/1920.-150.2101.1142@0.0.1575.846" timestamp="1578365476871" />
<state x="269" y="0" key="SettingsEditor" timestamp="1578363281492">
<screen x="0" y="0" width="1575" height="846" />
</state>
<state x="269" y="0" key="SettingsEditor/0.0.1575.846/1920.-150.2101.1142@0.0.1575.846" timestamp="1578363281492" />
<state x="233" y="75" key="Vcs.Push.Dialog.v2" timestamp="1578383921497">
<screen x="0" y="0" width="1280" height="680" />
</state>
<state x="233" y="75" key="Vcs.Push.Dialog.v2/0.0.1280.680@0.0.1280.680" timestamp="1578383921497" />
<state x="512" y="316" key="com.intellij.jarRepository.RepositoryAttachDialog-DOWNLOAD" timestamp="1578363278340">
<screen x="0" y="0" width="1575" height="846" />
</state>
<state x="512" y="316" key="com.intellij.jarRepository.RepositoryAttachDialog-DOWNLOAD/0.0.1575.846/1920.-150.2101.1142@0.0.1575.846" timestamp="1578363278340" />
<state x="606" y="340" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1578365479363">
<screen x="0" y="0" width="1575" height="846" />
</state>
<state x="606" y="340" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.0.1575.846/1920.-150.2101.1142@0.0.1575.846" timestamp="1578365479363" />
</component>
</project>
\ No newline at end of file
YZS, GQN LGBK-CNVVI LYNNGDQNL QBF CNVVRNL SRGQ LGBKL. GQN MVBRY-CNVVI LYNNGDQNL QBF YZYN HMZY GQBKL. GQZLN LGBKL SNKNY'G LZ CRP. GQNI SNKN KNBVVI LZ LXBVV IZH XRPQG GQRYU LHDQ B GQRYP SZHVFY'G XBGGNK BG BVV. CHG, CNDBHLN GQNI QBF LGBKL, BVV GQN LGBK-CNVVI LYNNGDQNL SZHVF CKBP, "SN'KN GQN CNLG URYF ZO LYNNGDQ ZY GQN CNBDQNL." SRGQ GQNRK LYZZGL RY GQN BRK, GQNI SZHVF LYROO BYF GQNI'F LYZKG "SN'VV QBEN YZGQRYP GZ FZ SRGQ GQN MVBRY-CNVVI LZKG!" BYF SQNYNENK GQNI XNG LZXN, SQNY GQNI SNKN ZHG
SBVURYP, GQNI'F QRUN KRPQG ZY MBLG GQNX SRGQZHG NENY GBVURYP. SQNY GQN LGBK-CNVVI DQRVFKNY SNYG ZHG GZ MVBI CBVV, DZHVF B MVBRY CNVVI PNG RY GQN PBXN... ? YZG BG BVV. IZH ZYVI DZHVF MVBI RO IZHK CNVVRNL QBF LGBKL. BYF GQN MVBRY CNVVI DQRVFKNY QBF YZYN HMZY GQBKL. SQNY GQN LGBK-CNVVI LYNNGDQNL QBF OKBYUOHKGNK KZBLGL ZK MRDYRDL ZK MBKGRNL ZK XBKLQXBVVZS GZBLGL, GQNI YNENK RYERGNF GQN MVBRY-CNVVI LYNNGDQNL. GQNI VNOG GQNX ZHG DZVF, RY GQN FBKU ZO GQN CNBDQNL. GQNI UNMG GQNX BSBI. YNENK VNG
GQNX DZXN YNBK. BYF GQBG'L QZS GQNI GKNBGNF GQNX INBK BOGNK INBK. GQNY ZYN FBI, RG LNNXL... SQRVN GQN MVBRY-CNVVI LYNNGDQNL SNKN XZMRYP BYF FZMRYP BVZYN ZY GQN CNBDQNL, THLG LRGGRYP GQNKN SRLQRYP GQNRK CNVVRNL QBF LGBKL... B LGKBYPNK ARMMNF HM RY GQN LGKBYPNLG ZO DBKL! "XI OKRNYFL," QN BYYZHYDNF RY B EZRDN DVNBK BYF UNNY, "XI YBXN RL LIVENLGNK XDXZYUNI XDCNBY. BYF R'EN QNBKF ZO IZHK GKZHCVNL. R'EN QNBKF IZH'KN HYQBMMI. CHG R DBY ORW GQBG. R'X GQN ORW-RG-HM DQBMMRN. R'EN DZXN QNKN GZ QNVM
IZH. R QBEN SQBG IZH YNNF. BYF XI MKRDNL BKN VZS. BYF R SZKU BG PKNBG LMNNF. BYF XI SZKU RL ZYN QHYFKNF MNKDNYG PHBKBYGNNF!" GQNY, JHRDUVI LIVENLGNK XDXZYUNI XDCNBY MHG GZPNGQNK B ENKI MNDHVRBK XBDQRYN. BYF QN LBRF, "IZH SBYG LGBKL VRUN B LGBK-CNVVI LYNNGDQ... ? XI OKRNYFL, IZH DBY QBEN GQNX OZK GQKNN FZVVBKL NBDQ!" "THLG MBI XN IZHK XZYNI BYF QZM KRPQG BCZBKF!" LZ GQNI DVBXCNKNF RYLRFN. GQNY GQN CRP XBDQRYN KZBKNF BYF RG UVZYUNF. BYF RG CZYUNF. BYF RG TNKUNF. BYF RG CNKUNF. BYF RG
CZMMNF GQNX BCZHG. CHG GQN GQRYP KNBVVI SZKUNF! SQNY GQN MVBRY-CNVVI LYNNGDQNL MZMMNF ZHG, GQNI QBF LGBKL! GQNI BDGHBVVI FRF. GQNI QBF LGBKL HMZY GQBKL! GQNY GQNI INVVNF BG GQN ZYNL SQZ QBF LGBKL BG GQN LGBKG, "SN'KN NWBDGVI VRUN IZH! IZH DBY'G GNVV HL BMBKG. SN'KN BVV THLG GQN LBXN, YZS, IZH LYZZGI ZVF LXBKGRNL! BYF YZS SN DBY PZ GZ IZHK OKBYUOHKGNK MBKGRNL." "PZZF PKRNO!" PKZBYNF GQN ZYNL SQZ QBF LGBKL BG GQN ORKLG. "SN'KN LGRVV GQN CNLG LYNNGDQNL BYF GQNI BKN GQN SZKLG. CHG, YZS, QZS RY GQN
SZKVF SRVV SN UYZS," GQNI BVV OKZSYNF, "RO SQRDQ URYF RL SQBG, ZK GQN ZGQNK SBI KZHYF?" GQNY HM DBXN XDCNBY SRGQ B ENKI LVI SRYU BYF QN LBRF, "GQRYPL BKN YZG JHRGN BL CBF BL IZH GQRYU. LZ IZH FZY'G UYZS SQZ'L SQZ. GQBG RL MNKONDGVI GKHN. CHG DZXN SRGQ XN, OKRNYFL. FZ IZH UYZS SQBG R'VV FZ? R'VV XBUN IZH, BPBRY, GQN CNLG LYNNGDQNL ZY GQN CNBDQNL BYF BVV RG SRVV DZLG IZH RL GNY FZVVBKL NBDQNL." "CNVVI LGBKL BKN YZ VZYPNK RY LGIVN," LBRF XDCNBY. "SQBG IZH YNNF RL B GKRM GQKZHPQ XI LGBK-ZOO
XBDQRYN. GQRL SZYFKZHL DZYGKBMGRZY SRVV GBUN ZOO IZHK LGBKL LZ IZH SZY'G VZZU VRUN LYNNGDQNL SQZ QBEN GQNX ZY GQBKL." BYF GQBG QBYFI XBDQRYN SZKURYP ENKI MKNDRLNVI KNXZENF BVV GQN LGBKL OKZX GQNRK GHXXRNL JHRGN YRDNVI. GQNY, SRGQ LYZZGL RY GQN BRK, GQNI MBKBFNF BCZHG BYF GQNI ZMNYNF GQNRK CNBUL BYF GQNI VNG ZHG B LQZHG, "SN UYZS SQZ RL SQZ! YZS GQNKN RLY'G B FZHCG. GQN CNLG URYF ZO LYNNGDQNL BKN LYNNGDQNL SRGQZHG!" GQNY, ZO DZHKLN, GQZLN SRGQ LGBKL PZG OKRPQGOHVVI XBF. GZ CN SNBKRYP B LGBK
YZS SBL OKRPQGOHVVI CBF. GQNY, ZO DZHKLN, ZVF LIVENLGNK XDXZYUNI XDCNBY RYERGNF GQNX RYGZ QRL LGBK-ZOO XBDQRYN. GQNY, ZO DZHKLN OKZX GQNY ZY, BL IZH MKZCBCVI PHNLL, GQRYPL KNBVVI PZG RYGZ B QZKKRCVN XNLL. BVV GQN KNLG ZO GQBG FBI, ZY GQZLN SRVF LDKNBXRYP CNBDQNL, GQN ORW-RG-HM DQBMMRN UNMG ORWRYP HM LYNNGDQNL. ZOO BPBRY! ZY BPBRY! RY BPBRY! ZHG BPBRY! GQKZHPQ GQN XBDQRYNL GQNI KBDNF KZHYF BYF BCZHG BPBRY, DQBYPRYP GQNRK LGBKL NENKI XRYHGN ZK GSZ. GQNI UNMG MBIRYP XZYNI. GQNI UNMG KHYYRYP
GQKZHPQ HYGRV YNRGQNK GQN MVBRY YZK GQN LGBK-CNVVRNL UYNS SQNGQNK GQRL ZYN SBL GQBG ZYN... ZK GQBG ZYN SBL GQRL ZYN ZK SQRDQ ZYN SBL SQBG ZYN... ZO SQBG ZYN SBL SQZ. GQNY, SQNY NENKI VBLG DNYG ZO GQNRK XZYNI SBL LMNYG, GQN ORW-RG-HM DQBMMRN MBDUNF HM BYF QN SNYG. BYF QN VBHPQNF BL QN FKZEN RY QRL DBK HM GQN CNBDQ, "GQNI YNENK SRVV VNBKY. YZ. IZH DBY'G GNBDQ B LYNNGDQ!" CHG XDCNBY SBL JHRGN SKZYP. R'X JHRGN QBMMI GZ LBI GQBG GQN LYNNGDQNL PZG KNBVVI JHRGN LXBKG ZY GQBG FBI, GQN FBI GQNI
FNDRFNF GQBG LYNNGDQNL BKN LYNNGDQNL BYF YZ URYF ZO LYNNGDQ RL GQN CNLG ZY GQN CNBDQNL. GQBG FBI, BVV GQN LYNNGDQNL OZKPZG BCZHG LGBKL BYF SQNGQNK GQNI QBF ZYN, ZK YZG, HMZY GQBKL.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Python" name="Python">
<configuration sdkName="" />
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/annotations/17.0.0/annotations-17.0.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="org.junit.jupiter:junit-jupiter:5.6.0-M1" level="project" />
<orderEntry type="library" scope="TEST" name="org.hamcrest:hamcrest:2.2" level="project" />
<orderEntry type="library" name="org.hamcrest:hamcrest-core:2.2" level="project" />
<orderEntry type="library" name="com.github.javaparser:javaparser-core:3.5.12" level="project" />
</component>
</module>
\ No newline at end of file
package edu.caltech.cs2.project01;
import java.util.Scanner;
public class CaesarCipher {
public static final char[] ALPHABET = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
};
/**
* Returns the 0-based index in the ALPHABET array where c appears,
* or -1 if c is not in ALPHABET
* For example:
* findIndexInAlphabet('A') returns 0
* findIndexInAlphabet('D') returns 3
* findIndexInAlphabet('+') returns -1
* findIndexInAlphabet('a') returns -1
* @param c the character whose index should be returned
* @return the index of c in ALPHABET or -1 if c is not in ALPHABET
*/
public static int findIndexInAlphabet(char c) {
return -1;
}
/**
* Returns c rotated by amount many characters. If we run out of letters
* in the alphabet, rotate back to 'A'. You may find it useful to call
* your findIndexInAlphabet method when writing this one.
*
* For example:
* rot('A', 0) returns 'A'
* rot('A', 1) returns 'B'
* rot('Z', 1) returns 'A'
* rot('A', 10) returns 'K'
* rot('J', 25) returns 'I'
*
* @param c the character to rotate
* @param amount the number of characters to rotate by
* @return the rotated version of the character
*/
public static char rot(char c, int amount) {
return 'A';
}
/**
* Returns a new string in which every character has been rotated
* by amount letters. This method assumes that every character in line is a
* upper-case alphabetic character. You may find it useful to call
* your rot character method when writing this one.
*
* For example:
* rot("A", 0) returns "A"
* rot("AA", 3) returns "DD"
* rot("HELLO", 0) returns "HELLO"
* rot("HELLO", 1) returns "IFMMP"
*
* @param line the string whose characters we want to rotate
* @param amount the number of characters to rotate each character in line by
* @return the rotated string
*/
public static String rot(String line, int amount) {
return "";
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("Type text to encrypt: ");
String line = in.nextLine();
System.out.print("Type a number to rotate by: ");
int amount = in.nextInt();
System.out.println(rot(line, amount));
}
}
package edu.caltech.cs2.project01;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class CaesarCipherSolver {
/**
* Rotates every character of every string in the List sentence by amount many characters.
* Note that this method does not return a new List. It should modify the original copy of
* the List instead. You may find it useful to call your rot String method (from CaesarCipher)
* when writing this one. This method assumes that every string in sentence is only made up of
* upper-case alphabetic characters.
*
* For example:
* rot(["A", "HELLO"], 1) modifies the list to hold ["B", "IFMMP"]
*
* @param sentence the List whose strings should be rotated by amount many characters
* @param amount the amount to rotate each character by
*/
public static void rot(List<String> sentence, int amount) {
}
/**
* Creates an List out of the input string, s, where each entry in the output
* is a single word from s. This method assumes s is a bunch of words separated by single
* spaces. This method does not need to worry about double spaces,
* spaces at the beginning or end, or other punctuation.
*
* For example:
* splitBySpaces("THE CAT IN THE HAT") returns ["THE", "CAT", "IN", "THE", "HAT"]
*
* @param s the string to split
* @return the List of words created
*/
public static List<String> splitBySpaces(String s) {
return new ArrayList<String>();
}
/**
* Returns a string that has all the words in the List concatenated with a single space between each one.
*
* For example:
* putTogetherWithSpaces(["THE", "CAT", "IN", "THE", "HAT"]) returns "THE CAT IN THE HAT"
*
* @param words the List of words to concatenate
* @return a string with all the words from the input List separated by spaces
*/
public static String putTogetherWithSpaces(List<String> words) {
return "";
}
/**
* Returns the number of strings in sentence that are also in dictionary.
*
* For example:
* howManyWordsIn(["THE", "CAT", "IN", "THE", "ZZZ", "PRQ"], ["CAT", "COOKIE", "IN", "THE"]) returns 4
*
* @param sentence the List of words to check in the dictionary
* @param dictionary the dictionary of words to check
* @return the number of words in sentence that are also in dictionary
*/
public static int howManyWordsIn(List<String> sentence, List<String> dictionary) {
return 0;
}
/**
* main() should allow the user to decrypt a previously encrypted Caesar Cipher.
* It should use the console to get the sentence to decrypt, loop through all the
* possible rotations, and print out all likely translations. You may find it
* useful to call your rot, splitBySpaces, putTogetherWithSpaces, and
* howManyWordsIn methods when writing this one.
*/
public static void main(String[] args) {
List<String> dictionary = getDictionary();
}
/**
*
*
* You do not need to edit below this point.
* These methods are provided to deal with the dictionary file!
*
*
**/
public static List<String> getDictionary() {
List<String> dictionary = new ArrayList<>();
try (Scanner s = getDictionaryScanner()) {
while (s.hasNextLine()) {
dictionary.add(s.nextLine());
}
}
return dictionary;
}
public static Scanner getDictionaryScanner() {
try {
return new Scanner(new File("dictionary.txt"));
} catch (FileNotFoundException e) {
throw new RuntimeException("Failed to open dictionary");
}
}
}
\ No newline at end of file
package edu.caltech.cs2.project01;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class QuadGramLikelihoods {
private Map<String, Double> likelihoods;
private double notFoundLikelihood;
public QuadGramLikelihoods() throws FileNotFoundException {
Map<String, Integer> freqs = getQuadFrequencies();
long total = freqs.size();
for (int freq : freqs.values()) {
total += freq;
}
this.notFoundLikelihood = -Math.log10(total);
this.likelihoods = new HashMap<>();
for (Map.Entry<String, Integer> qg : freqs.entrySet()) {
this.likelihoods.put(qg.getKey(), Math.log10(qg.getValue()) + this.notFoundLikelihood);
}
}
public static Map<String, Integer> getQuadFrequencies() throws FileNotFoundException {
Map<String, Integer> freqs = new HashMap<>();
try (Scanner quadgrams = new Scanner(new File("english_quadgrams.txt"))) {
while (quadgrams.hasNext()) {
freqs.put(quadgrams.next(), quadgrams.nextInt());
}
}
return freqs;
}
/**
* Returns the log-likelihood of the provided quad-gram.
* @param quadgram the quad-gram to get the likelihood of
* @return the log-likelihood as calculated by our data set
*/
public double get(String quadgram) {
return this.likelihoods.getOrDefault(quadgram, this.notFoundLikelihood);
}
}
package edu.caltech.cs2.project01;
import java.util.Map;
import java.util.Random;
public class SubstitutionCipher {
private String ciphertext;
private Map<Character, Character> key;
// Use this Random object to generate random numbers in your code,
// but do not modify this line.
private static final Random RANDOM = new Random();
/**
* Construct a SubstitutionCipher with the given cipher text and key
* @param ciphertext the cipher text for this substitution cipher
* @param key the map from cipher text characters to plaintext characters
*/
public SubstitutionCipher(String ciphertext, Map<Character, Character> key) {
// TODO: Student fill this in
}
/**
* Construct a SubstitutionCipher with the given cipher text and a randomly
* initialized key.
* @param ciphertext the cipher text for this substitution cipher
*/
public SubstitutionCipher(String ciphertext) {
// TODO: Student fill this in
}
/**
* Returns the unedited cipher text that was provided by the user.
* @return the cipher text for this substitution cipher
*/
public String getCipherText() {
// TODO: Student fill this in
return null;
}
/**
* Applies this cipher's key onto this cipher's text.
* That is, each letter should be replaced with whichever
* letter it maps to in this cipher's key.
* @return the resulting plain text after the transformation using the key
*/
public String getPlainText() {
// TODO: Student fill this in
return null;
}
/**
* Returns a new SubstitutionCipher with the same cipher text as this one
* and a modified key with exactly one random pair of characters exchanged.
*
* @return the new SubstitutionCipher
*/
public SubstitutionCipher randomSwap() {
// TODO: Student fill this in
return null;
}
/**
* Returns the "score" for the "plain text" for this cipher.
* The score for each individual quadgram is calculated by
* the provided likelihoods object. The total score for the text is just
* the sum of these scores.
* @param likelihoods the object used to find a score for a quadgram
* @return the score of the plain text as calculated by likelihoods
*/
public double getScore(QuadGramLikelihoods likelihoods) {
// TODO: Student fill this in
return 0.0;
}
/**
* Attempt to solve this substitution cipher through the hill
* climbing algorithm. The SubstitutionCipher this is called from
* should not be modified.
* @param likelihoods the object used to find a score for a quadgram
* @return a SubstitutionCipher with the same ciphertext and the optimal
* found through hill climbing
*/
public SubstitutionCipher getSolution(QuadGramLikelihoods likelihoods) {
// TODO: Student fill this in
return null;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment