Commit 3199a0a5 authored by Adam Blank's avatar Adam Blank
Browse files

Initial commit

parents
No related merge requests found
Pipeline #7869 canceled with stage
Showing with 835 additions and 0 deletions
+835 -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
static:
script: "/testers/cs2/lab06/static"
B:
script: "/testers/cs2/lab06/B/test"
A:
script: "/testers/cs2/lab06/A/test"
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>
\ No newline at end of file
<component name="libraryTable">
<library name="com.github.javaparser:javaparser-core:3.5.2" type="repository">
<properties maven-id="com.github.javaparser:javaparser-core:3.5.2" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/github/javaparser/javaparser-core/3.5.2/javaparser-core-3.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="org.hamcrest:hamcrest-all:1.3" type="repository">
<properties maven-id="org.hamcrest:hamcrest-all:1.3" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="org.junit.jupiter:junit-jupiter-params:5.4.0" type="repository">
<properties maven-id="org.junit.jupiter:junit-jupiter-params:5.4.0" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-params/5.4.0/junit-jupiter-params-5.4.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-api/5.4.0/junit-jupiter-api-5.4.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/opentest4j/opentest4j/1.1.1/opentest4j-1.1.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-commons/1.4.0/junit-platform-commons-1.4.0.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$/lab06-anagrams.iml" filepath="$PROJECT_DIR$/lab06-anagrams.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="ChangeListManager">
<list default="true" id="e34af6f8-c7b1-4629-9ff0-b40ce10021d4" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lab06-anagrams.iml" beforeDir="false" afterPath="$PROJECT_DIR$/lab06-anagrams.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/edu/caltech/cs2/lab06/AnagramGenerator.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/edu/caltech/cs2/lab06/AnagramGenerator.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../Projects/project01/project01-nbodysimulation" beforeDir="false" afterPath="$PROJECT_DIR$/../../../Projects/project01/project01-nbodysimulation" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../Projects/project01/project01-nbodysimulation-solution" beforeDir="false" afterPath="$PROJECT_DIR$/../../../Projects/project01/project01-nbodysimulation-solution" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../Projects/project01/project01-reference-solution" beforeDir="false" afterPath="$PROJECT_DIR$/../../../Projects/project01/project01-reference-solution" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../Projects/project02/spec/spec.log" beforeDir="false" afterPath="$PROJECT_DIR$/../../../Projects/project02/spec/spec.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../Projects/project02/spec/spec.pdf" beforeDir="false" afterPath="$PROJECT_DIR$/../../../Projects/project02/spec/spec.pdf" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<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="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab06/AnagramGenerator.java">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="7" selection-start-column="7" selection-end-column="7" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab06/ConsoleAnagramPrinter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="192">
<caret line="10" column="7" selection-start-line="10" selection-start-column="7" selection-end-line="10" selection-end-column="7" />
</state>
</provider>
</entry>
</file>
</leaf>
</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="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/dictionaries/dict1.txt" />
<option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab06/AnagramPrinter.java" />
<option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab06/PhraseAnagramPrinter.java" />
<option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab06/AnagramMain.java" />
<option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab06/Anagrams.java" />
<option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab06/ConsoleAnagramGenerator.java" />
<option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab06/ConsoleAnagramPrinter.java" />
<option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab06/LetterBag.java" />
<option value="$PROJECT_DIR$/src/edu/caltech/cs2/lab06/AnagramGenerator.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" fullScreen="true">
<option name="width" value="1440" />
<option name="height" value="900" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="lab06-anagrams" type="b2602c69:ProjectViewProjectNode" />
<item name="lab06-anagrams" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="lab06-anagrams" type="b2602c69:ProjectViewProjectNode" />
<item name="lab06-anagrams" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="lab06-anagrams" type="b2602c69:ProjectViewProjectNode" />
<item name="lab06-anagrams" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="lab06" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</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="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1550161508575" />
<property name="full.screen.before.presentation.mode" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="project.structure.last.edited" value="Modules" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.2" />
</component>
<component name="RecentsManager">
<key name="CopyClassDialog.RECENTS_KEY">
<recent name="edu.caltech.cs2.lab06" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/dictionaries" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="JUnit.B Tests">
<configuration name="Anagram Printer" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="edu.caltech.cs2.lab06.ConsoleAnagramPrinter" />
<module name="lab06-anagrams" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="A Tests" type="JUnit" factoryName="JUnit">
<module name="lab06-anagrams" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="tags" />
<option name="PARAMETERS" value="" />
<tag value="A" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="B Tests" type="JUnit" factoryName="JUnit">
<module name="lab06-anagrams" />
<option name="MAIN_CLASS_NAME" value="B" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="tags" />
<option name="PARAMETERS" value="" />
<tag value="B" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="Application.Anagram Printer" />
<item itemvalue="JUnit.B Tests" />
<item itemvalue="JUnit.A Tests" />
</list>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="e34af6f8-c7b1-4629-9ff0-b40ce10021d4" name="Default Changelist" comment="" />
<created>1546370282222</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1546370282222</updated>
</task>
<servers />
</component>
<component name="TestHistory">
<history-entry file="A_Tests - 2019.02.14 at 08h 22m 32s.xml">
<configuration name="A Tests" configurationId="JUnit" />
</history-entry>
<history-entry file="B_Tests - 2019.02.14 at 08h 23m 29s.xml">
<configuration name="B Tests" configurationId="JUnit" />
</history-entry>
</component>
<component name="ToolWindowManager">
<frame x="0" y="0" width="1440" height="900" extended-state="0" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.28183118" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Image Layers" order="2" />
<window_info id="Designer" order="3" />
<window_info id="UI Designer" order="4" />
<window_info id="Capture Tool" order="5" />
<window_info id="Favorites" order="6" side_tool="true" />
<window_info anchor="bottom" id="Floobits" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" weight="0.3299363" />
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.37710842" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Terminal" order="7" />
<window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
<window_info anchor="bottom" id="Version Control" order="9" />
<window_info anchor="bottom" id="Messages" order="10" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="right" id="Palette" order="3" />
<window_info anchor="right" id="Maven" order="4" />
<window_info anchor="right" id="Theme Preview" order="5" />
<window_info anchor="right" id="Capture Analysis" order="6" />
<window_info anchor="right" id="Palette&#9;" order="7" />
</layout>
<layout-to-restore>
<window_info id="Image Layers" order="0" />
<window_info id="Designer" order="1" />
<window_info id="UI Designer" order="2" />
<window_info id="Capture Tool" order="3" />
<window_info id="Favorites" order="4" side_tool="true" />
<window_info content_ui="combo" id="Project" order="5" visible="true" weight="0.2819063" />
<window_info id="Structure" order="6" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Version Control" order="0" />
<window_info anchor="bottom" id="Terminal" order="1" />
<window_info anchor="bottom" id="Event Log" order="2" side_tool="true" />
<window_info anchor="bottom" id="Messages" order="3" />
<window_info anchor="bottom" id="Message" order="4" />
<window_info anchor="bottom" id="Find" order="5" weight="0.3299363" />
<window_info active="true" anchor="bottom" id="Run" order="6" visible="true" weight="0.37810218" />
<window_info anchor="bottom" id="Debug" order="7" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="8" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="9" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="10" />
<window_info anchor="right" id="Palette" order="0" />
<window_info anchor="right" id="Capture Analysis" order="1" />
<window_info anchor="right" id="Theme Preview" order="2" />
<window_info anchor="right" id="Palette&#9;" order="3" />
<window_info anchor="right" id="Maven" order="4" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="5" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="6" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="7" weight="0.25" />
</layout-to-restore>
</component>
<component name="editorHistoryManager">
<entry file="jar:///Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/src.zip!/java.base/java/lang/CharacterData.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="29" column="17" selection-start-line="29" selection-start-column="17" selection-end-line="29" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="jar:///Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/src.zip!/java.base/java/lang/Character.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2972">
<caret line="10322" column="46" lean-forward="true" selection-start-line="10322" selection-start-column="46" selection-end-line="10322" selection-end-column="46" />
<folding>
<element signature="e#345120#345121#0" expanded="true" />
<element signature="e#345163#345164#0" expanded="true" />
<element signature="e#410002#410003#0" expanded="true" />
<element signature="e#410071#410072#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dictionaries/dict2.txt" />
<entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab06/PhraseAnagramPrinter.java" />
<entry file="file://$PROJECT_DIR$/dictionaries/eleven.txt">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/dictionaries/twl06.txt" />
<entry file="file://$PROJECT_DIR$/dictionaries/dictionary.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="7492" selection-start-line="7492" selection-end-line="7492" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab06/LetterBag.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="870">
<caret line="56" selection-start-line="56" selection-end-line="56" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1138#1139#0" expanded="true" />
<element signature="e#1180#1181#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab06/ConsoleAnagramPrinter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="192">
<caret line="10" column="7" selection-start-line="10" selection-start-column="7" selection-end-line="10" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.idea/vcs.xml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/tests/edu/caltech/cs2/lab06/WordAnagramsTests.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="155">
<caret line="98" column="14" selection-start-line="98" selection-start-column="14" selection-end-line="98" selection-end-column="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1239" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/edu/caltech/cs2/lab06/AnagramGenerator.java">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="7" selection-start-column="7" selection-end-column="7" />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ArtifactsStructureConfigurable.UI">
<settings>
<artifact-editor />
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="FacetStructureConfigurable.UI">
<settings>
<last-edited>No facets are configured</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="GlobalLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="JdkListConfigurable.UI">
<settings>
<last-edited>11</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ModuleStructureConfigurable.UI">
<settings>
<last-edited>lab06-anagrams</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectJDKs.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectLibrariesConfigurable.UI">
<settings>
<last-edited>com.github.javaparser:javaparser-core:3.5.2</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
\ No newline at end of file
This diff is collapsed.
one
plus
potato
twelve
won
zebra
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<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="library" scope="PROVIDED" name="org.junit.jupiter:junit-jupiter-params:5.4.0" level="project" />
<orderEntry type="library" name="org.hamcrest:hamcrest-all:1.3" level="project" />
<orderEntry type="library" name="com.github.javaparser:javaparser-core:3.5.2" level="project" />
</component>
</module>
\ No newline at end of file
package edu.caltech.cs2.lab06;
import java.util.List;
public class AnagramGenerator {
public static void printPhrases(String phrase, List<String> dictionary) {
}
public static void printWords(String word, List<String> dictionary) {
}
}
package edu.caltech.cs2.lab06;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.*;
public class ConsoleAnagramPrinter {
public static void main(String[] args) throws FileNotFoundException {
System.out.println("Welcome to the CS 2 Anagram Printer!");
Scanner console = new Scanner(System.in);
// open the dictionary file
Scanner input = new Scanner(new File("dictionaries/dictionary.txt"));
// Read dictionary into a List
List<String> dictionary = new ArrayList<String>();
while (input.hasNextLine()) {
dictionary.add(input.nextLine());
}
// Generate word and phrase anagrams
dictionary = Collections.unmodifiableList(dictionary);
while (true) {
System.out.println();
System.out.print("What word or phrase should I find anagrams for (return to quit)? ");
String phrase = console.nextLine();
if (phrase.isEmpty()) {
break;
}
System.out.println("The matching phrases are...");
AnagramGenerator.printPhrases(phrase, dictionary);
System.out.println();
System.out.println("The matching words are...");
AnagramGenerator.printWords(phrase, dictionary);
}
}
}
package edu.caltech.cs2.lab06;
import java.util.HashMap;
import java.util.Map;
public class LetterBag {
private Map<Character, Integer> bag;
public LetterBag(String s) {
this.bag = new HashMap<>();
for (Character c : s.toCharArray()) {
if (c < 'a' || c > 'z') {
continue;
}
if (!this.bag.containsKey(c)) {
this.bag.put(c, 0);
}
this.bag.put(c, this.bag.get(c) + 1);
}
}
public boolean isEmpty() {
return this.bag.isEmpty();
}
public LetterBag subtract(LetterBag other) {
LetterBag result = new LetterBag("");
if (!this.bag.keySet().containsAll(other.bag.keySet())) {
return null;
}
for (Character c : this.bag.keySet()) {
int remaining = this.bag.get(c) - other.bag.getOrDefault(c, 0);
if (remaining < 0) {
return null;
}
if (remaining > 0) {
result.bag.put(c, remaining);
}
}
return result;
}
public int hashCode() {
return this.bag.hashCode();
}
public boolean equals(Object o) {
if (!(o instanceof LetterBag)) {
return false;
}
return this.bag.equals(((LetterBag)o).bag);
}
}
\ No newline at end of file
[one, plus, twelve]
[one, twelve, plus]
[plus, one, twelve]
[plus, twelve, one]
[twelve, one, plus]
[twelve, plus, one]
\ No newline at end of file
[let, sin]
[listen]
[lit, sen]
[nil, set]
[sen, lit]
[sen, til]
[set, nil]
[silent]
[sin, let]
[til, sen]
[tinsel]
\ No newline at end of file
[karma, pig]
[magi, park]
[park, magi]
[pig, karma]
\ No newline at end of file
[mate]
[meat]
[tame]
[team]
\ No newline at end of file
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