first commit

This commit is contained in:
2019-08-13 12:23:06 -05:00
commit 916073f43b
337 changed files with 23253 additions and 0 deletions

18
Lab 3/.idea/checkstyle-idea.xml generated Normal file
View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CheckStyle-IDEA">
<option name="configuration">
<map>
<entry key="active-configuration" value="LOCAL_FILE:C:/Users/barnestr/Documents/SE 1021/Spring 2018/SE1021_checkStyle - v3.xml:SE" />
<entry key="checkstyle-version" value="8.5" />
<entry key="copy-libs" value="true" />
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
<entry key="location-2" value="LOCAL_FILE:C:/Users/barnestr/Documents/SE 1021/Spring 2018/SE1021_checkStyle - v3.xml:SE" />
<entry key="scan-before-checkin" value="false" />
<entry key="scanscope" value="JavaOnly" />
<entry key="suppress-errors" value="false" />
</map>
</option>
</component>
</project>

View File

@@ -0,0 +1,6 @@
This folder contains libraries copied from the "Lab 3" project.
It is managed by the CheckStyle-IDEA IDE plugin.
Do not modify this folder while the IDE is running.
When the IDE is stopped, you may delete this folder at any time. It will be recreated as needed.
In order to prevent the CheckStyle-IDEA IDE plugin from creating this folder,
uncheck the "Copy libraries from project directory" option in the CheckStyle-IDEA settings dialog.

6
Lab 3/.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
Lab 3/.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Lab 3.iml" filepath="$PROJECT_DIR$/Lab 3.iml" />
</modules>
</component>
</project>

953
Lab 3/.idea/workspace.xml generated Normal file
View File

@@ -0,0 +1,953 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="6b1890a5-e824-4858-ba18-a385836391ef" name="Default" comment="" />
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" 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="CheckStyle-IDEA-workspace">
<option name="configuration">
<map>
<entry key="last-active-plugin-version" value="5.18.4" />
</map>
</option>
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="Assembly.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/barnestr/Assembly.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="351">
<caret line="86" column="97" lean-forward="false" selection-start-line="86" selection-start-column="97" selection-end-line="86" selection-end-column="97" />
<folding>
<element signature="e#0#3146#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Bolt.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/barnestr/Bolt.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="748">
<caret line="52" column="55" lean-forward="false" selection-start-line="52" selection-start-column="55" selection-end-line="52" selection-end-column="55" />
<folding>
<element signature="e#0#2422#0" expanded="true" />
<element signature="e#1135#1136#0" expanded="true" />
<element signature="e#1204#1205#0" expanded="true" />
<element signature="e#1360#1361#0" expanded="true" />
<element signature="e#1428#1429#0" expanded="true" />
<element signature="e#1621#1622#0" expanded="true" />
<element signature="e#1709#1710#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="MachineDriver.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/barnestr/MachineDriver.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1462">
<caret line="92" column="10" lean-forward="false" selection-start-line="92" selection-start-column="10" selection-end-line="92" selection-end-column="10" />
<folding>
<element signature="e#0#3520#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Part.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/barnestr/Part.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="11" column="3" lean-forward="false" selection-start-line="11" selection-start-column="3" selection-end-line="11" selection-end-column="3" />
<folding>
<element signature="e#0#372#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Nut.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/barnestr/Nut.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="561">
<caret line="41" column="42" lean-forward="false" selection-start-line="41" selection-start-column="42" selection-end-line="41" selection-end-column="42" />
<folding>
<element signature="e#0#2155#0" expanded="true" />
<element signature="e#1185#1186#0" expanded="true" />
<element signature="e#1236#1237#0" expanded="true" />
<element signature="e#1428#1429#0" expanded="true" />
<element signature="e#1501#1502#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="SheetMetal.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/barnestr/SheetMetal.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1071">
<caret line="75" column="92" lean-forward="false" selection-start-line="75" selection-start-column="92" selection-end-line="75" selection-end-column="92" />
<folding>
<element signature="e#0#2804#0" expanded="true" />
<element signature="e#1396#1397#0" expanded="true" />
<element signature="e#1480#1481#0" expanded="true" />
<element signature="e#1652#1653#0" expanded="true" />
<element signature="e#1742#1743#0" expanded="true" />
<element signature="e#1942#1943#0" expanded="true" />
<element signature="e#2026#2027#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Duplicate.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/barnestr/Duplicate.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1326">
<caret line="88" column="98" lean-forward="false" selection-start-line="88" selection-start-column="98" selection-end-line="88" selection-end-column="98" />
<folding>
<element signature="e#0#3428#0" expanded="true" />
<element signature="e#2182#2183#0" expanded="true" />
<element signature="e#2256#2257#0" expanded="true" />
<element signature="e#2427#2428#0" expanded="true" />
<element signature="e#2491#2492#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Interface" />
<option value="Class" />
</list>
</option>
</component>
<component name="GradleLocalSettings">
<option name="externalProjectsViewState">
<projects_view />
</option>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/barnestr/MachineDriver.java" />
<option value="$PROJECT_DIR$/src/barnestr/Assembly.java" />
<option value="$PROJECT_DIR$/src/barnestr/Bolt.java" />
<option value="$PROJECT_DIR$/src/barnestr/Duplicate.java" />
<option value="$PROJECT_DIR$/src/barnestr/Nut.java" />
<option value="$PROJECT_DIR$/src/barnestr/SheetMetal.java" />
<option value="$PROJECT_DIR$/src/barnestr/Part.java" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="953" />
<option name="width" value="974" />
<option name="height" value="1027" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="Lab 3" type="b2602c69:ProjectViewProjectNode" />
<item name="Lab 3" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Lab 3" type="b2602c69:ProjectViewProjectNode" />
<item name="Lab 3" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Lab 3" type="b2602c69:ProjectViewProjectNode" />
<item name="Lab 3" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="barnestr" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="PackagesPane" />
<pane id="AndroidView" />
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="settings.editor.selected.configurable" value="org.infernus.idea.checkstyle.CheckStyleConfigurable" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="project.structure.last.edited" value="Modules" />
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.2" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../SE1021_checkStyle - v3.xml" />
</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="Application.MachineDriver">
<configuration name="MachineDriver" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="barnestr.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="MAIN_CLASS_NAME" value="barnestr.MachineDriver" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="Lab 3" />
<envs />
</configuration>
<configuration default="true" type="Applet" factoryName="Applet">
<module />
<option name="HTML_USED" value="false" />
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
</configuration>
<configuration default="true" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="" />
<envs />
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
</configuration>
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
<module name="" />
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
<option name="PROGRAM_PARAMETERS" />
<predefined_log_file id="idea.log" enabled="true" />
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="GROUP_NAME" />
<option name="TEST_OBJECT" value="CLASS" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<option name="OUTPUT_DIRECTORY" />
<option name="ANNOTATION_TYPE" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="PROPERTIES_FILE" />
<envs />
<properties />
<listeners />
</configuration>
<recent_temporary>
<list size="1">
<item index="0" class="java.lang.String" itemvalue="Application.MachineDriver" />
</list>
</recent_temporary>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="6b1890a5-e824-4858-ba18-a385836391ef" name="Default" comment="" />
<created>1521608136528</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1521608136528</updated>
<workItem from="1521608140276" duration="10050000" />
<workItem from="1521839221370" duration="5000" />
<workItem from="1522103223360" duration="12641000" />
<workItem from="1522278093140" duration="7955000" />
<workItem from="1522348070550" duration="667000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="31318000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32661718" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="CheckStyle" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.09427083" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33297643" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="2" />
</breakpoint-manager>
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/barnestr/Assembly.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#0#3146#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Bolt.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="748">
<caret line="52" column="55" lean-forward="false" selection-start-line="52" selection-start-column="55" selection-end-line="52" selection-end-column="55" />
<folding>
<element signature="e#0#2422#0" expanded="true" />
<element signature="e#1135#1136#0" expanded="true" />
<element signature="e#1204#1205#0" expanded="true" />
<element signature="e#1360#1361#0" expanded="true" />
<element signature="e#1428#1429#0" expanded="true" />
<element signature="e#1621#1622#0" expanded="true" />
<element signature="e#1709#1710#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/MachineDriver.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1462">
<caret line="92" column="10" lean-forward="false" selection-start-line="92" selection-start-column="10" selection-end-line="92" selection-end-column="10" />
<folding>
<element signature="e#0#3520#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Part.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="11" column="3" lean-forward="false" selection-start-line="11" selection-start-column="3" selection-end-line="11" selection-end-column="3" />
<folding>
<element signature="e#0#372#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Nut.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="561">
<caret line="41" column="42" lean-forward="true" selection-start-line="41" selection-start-column="42" selection-end-line="41" selection-end-column="42" />
<folding>
<element signature="e#0#2155#0" expanded="true" />
<element signature="e#1185#1186#0" expanded="true" />
<element signature="e#1236#1237#0" expanded="true" />
<element signature="e#1428#1429#0" expanded="true" />
<element signature="e#1501#1502#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/SheetMetal.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1071">
<caret line="75" column="92" lean-forward="true" selection-start-line="75" selection-start-column="92" selection-end-line="75" selection-end-column="92" />
<folding>
<element signature="e#0#2804#0" expanded="true" />
<element signature="e#1396#1397#0" expanded="true" />
<element signature="e#1480#1481#0" expanded="true" />
<element signature="e#1652#1653#0" expanded="true" />
<element signature="e#1742#1743#0" expanded="true" />
<element signature="e#1942#1943#0" expanded="true" />
<element signature="e#2026#2027#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Duplicate.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1326">
<caret line="88" column="98" lean-forward="true" selection-start-line="88" selection-start-column="98" selection-end-line="88" selection-end-column="98" />
<folding>
<element signature="e#0#3428#0" expanded="true" />
<element signature="e#2182#2183#0" expanded="true" />
<element signature="e#2256#2257#0" expanded="true" />
<element signature="e#2427#2428#0" expanded="true" />
<element signature="e#2491#2492#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Part.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="12" column="16" lean-forward="false" selection-start-line="12" selection-start-column="16" selection-end-line="12" selection-end-column="16" />
<folding>
<element signature="e#0#372#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/MachineDriver.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="11" column="13" lean-forward="false" selection-start-line="11" selection-start-column="13" selection-end-line="11" selection-end-column="13" />
<folding>
<element signature="e#0#3520#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Assembly.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="3" lean-forward="true" selection-start-line="0" selection-start-column="0" selection-end-line="6" selection-end-column="3" />
<folding>
<element signature="e#0#3146#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Duplicate.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="833">
<caret line="59" column="47" lean-forward="false" selection-start-line="59" selection-start-column="47" selection-end-line="59" selection-end-column="47" />
<folding>
<element signature="e#0#3428#0" expanded="true" />
<element signature="e#2182#2183#0" expanded="true" />
<element signature="e#2256#2257#0" expanded="true" />
<element signature="e#2427#2428#0" expanded="true" />
<element signature="e#2491#2492#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Bolt.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="714">
<caret line="51" column="55" lean-forward="false" selection-start-line="51" selection-start-column="55" selection-end-line="51" selection-end-column="55" />
<folding>
<element signature="e#0#2422#0" expanded="true" />
<element signature="e#1135#1136#0" expanded="true" />
<element signature="e#1204#1205#0" expanded="true" />
<element signature="e#1360#1361#0" expanded="true" />
<element signature="e#1428#1429#0" expanded="true" />
<element signature="e#1621#1622#0" expanded="true" />
<element signature="e#1709#1710#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Nut.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="629">
<caret line="48" column="34" lean-forward="false" selection-start-line="48" selection-start-column="34" selection-end-line="48" selection-end-column="34" />
<folding>
<element signature="e#0#2155#0" expanded="true" />
<element signature="e#1185#1186#0" expanded="true" />
<element signature="e#1236#1237#0" expanded="true" />
<element signature="e#1428#1429#0" expanded="true" />
<element signature="e#1501#1502#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/SheetMetal.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="765">
<caret line="54" column="76" lean-forward="false" selection-start-line="54" selection-start-column="76" selection-end-line="54" selection-end-column="76" />
<folding>
<element signature="e#0#2804#0" expanded="true" />
<element signature="e#1396#1397#0" expanded="true" />
<element signature="e#1480#1481#0" expanded="true" />
<element signature="e#1652#1653#0" expanded="true" />
<element signature="e#1742#1743#0" expanded="true" />
<element signature="e#1942#1943#0" expanded="true" />
<element signature="e#2026#2027#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Part.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="12" column="16" lean-forward="false" selection-start-line="12" selection-start-column="16" selection-end-line="12" selection-end-column="16" />
<folding>
<element signature="e#0#372#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/MachineDriver.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="3" lean-forward="false" selection-start-line="6" selection-start-column="3" selection-end-line="6" selection-end-column="3" />
<folding>
<element signature="e#0#3520#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Assembly.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="238">
<caret line="21" column="36" lean-forward="false" selection-start-line="21" selection-start-column="36" selection-end-line="21" selection-end-column="36" />
<folding>
<element signature="e#0#3146#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Duplicate.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="11" column="23" lean-forward="false" selection-start-line="11" selection-start-column="23" selection-end-line="11" selection-end-column="23" />
<folding>
<element signature="e#0#3428#0" expanded="true" />
<element signature="e#2182#2183#0" expanded="true" />
<element signature="e#2256#2257#0" expanded="true" />
<element signature="e#2427#2428#0" expanded="true" />
<element signature="e#2491#2492#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Bolt.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1037">
<caret line="73" column="57" lean-forward="false" selection-start-line="73" selection-start-column="57" selection-end-line="73" selection-end-column="57" />
<folding>
<element signature="e#0#2422#0" expanded="true" />
<element signature="e#1135#1136#0" expanded="true" />
<element signature="e#1204#1205#0" expanded="true" />
<element signature="e#1360#1361#0" expanded="true" />
<element signature="e#1428#1429#0" expanded="true" />
<element signature="e#1621#1622#0" expanded="true" />
<element signature="e#1709#1710#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/SheetMetal.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="714">
<caret line="48" column="0" lean-forward="false" selection-start-line="48" selection-start-column="0" selection-end-line="48" selection-end-column="0" />
<folding>
<element signature="e#0#2804#0" expanded="true" />
<element signature="e#1396#1397#0" expanded="true" />
<element signature="e#1480#1481#0" expanded="true" />
<element signature="e#1652#1653#0" expanded="true" />
<element signature="e#1742#1743#0" expanded="true" />
<element signature="e#1942#1943#0" expanded="true" />
<element signature="e#2026#2027#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Nut.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="901">
<caret line="67" column="38" lean-forward="false" selection-start-line="67" selection-start-column="38" selection-end-line="67" selection-end-column="38" />
<folding>
<element signature="e#0#2155#0" expanded="true" />
<element signature="e#1185#1186#0" expanded="true" />
<element signature="e#1236#1237#0" expanded="true" />
<element signature="e#1428#1429#0" expanded="true" />
<element signature="e#1501#1502#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Part.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="12" column="16" lean-forward="false" selection-start-line="12" selection-start-column="16" selection-end-line="12" selection-end-column="16" />
<folding>
<element signature="e#0#372#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/MachineDriver.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="3" lean-forward="false" selection-start-line="6" selection-start-column="3" selection-end-line="6" selection-end-column="3" />
<folding>
<element signature="e#0#3520#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Assembly.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
<caret line="21" column="36" lean-forward="true" selection-start-line="21" selection-start-column="36" selection-end-line="21" selection-end-column="36" />
<folding>
<element signature="e#0#3146#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Duplicate.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="187">
<caret line="11" column="23" lean-forward="false" selection-start-line="11" selection-start-column="23" selection-end-line="11" selection-end-column="23" />
<folding>
<element signature="e#0#3428#0" expanded="true" />
<element signature="e#2182#2183#0" expanded="true" />
<element signature="e#2256#2257#0" expanded="true" />
<element signature="e#2427#2428#0" expanded="true" />
<element signature="e#2491#2492#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Bolt.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1241">
<caret line="73" column="57" lean-forward="false" selection-start-line="73" selection-start-column="57" selection-end-line="73" selection-end-column="57" />
<folding>
<element signature="e#0#2422#0" expanded="true" />
<element signature="e#1135#1136#0" expanded="true" />
<element signature="e#1204#1205#0" expanded="true" />
<element signature="e#1360#1361#0" expanded="true" />
<element signature="e#1428#1429#0" expanded="true" />
<element signature="e#1621#1622#0" expanded="true" />
<element signature="e#1709#1710#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/SheetMetal.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="816">
<caret line="48" column="0" lean-forward="true" selection-start-line="48" selection-start-column="0" selection-end-line="48" selection-end-column="0" />
<folding>
<element signature="e#0#2804#0" expanded="true" />
<element signature="e#1396#1397#0" expanded="true" />
<element signature="e#1480#1481#0" expanded="true" />
<element signature="e#1652#1653#0" expanded="true" />
<element signature="e#1742#1743#0" expanded="true" />
<element signature="e#1942#1943#0" expanded="true" />
<element signature="e#2026#2027#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Nut.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1139">
<caret line="67" column="38" lean-forward="false" selection-start-line="67" selection-start-column="38" selection-end-line="67" selection-end-column="38" />
<folding>
<element signature="e#0#2155#0" expanded="true" />
<element signature="e#1185#1186#0" expanded="true" />
<element signature="e#1236#1237#0" expanded="true" />
<element signature="e#1428#1429#0" expanded="true" />
<element signature="e#1501#1502#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="jar://C:/Program Files/Java/jdk1.8.0_144/src.zip!/java/text/DecimalFormat.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="200">
<caret line="506" column="0" lean-forward="false" selection-start-line="506" selection-start-column="0" selection-end-line="506" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="jar://C:/Program Files/Java/jdk1.8.0_144/src.zip!/java/text/Format.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="200">
<caret line="156" column="0" lean-forward="false" selection-start-line="156" selection-start-column="0" selection-end-line="156" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Nut.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="561">
<caret line="41" column="42" lean-forward="false" selection-start-line="41" selection-start-column="42" selection-end-line="41" selection-end-column="42" />
<folding>
<element signature="e#0#2155#0" expanded="true" />
<element signature="e#1185#1186#0" expanded="true" />
<element signature="e#1236#1237#0" expanded="true" />
<element signature="e#1428#1429#0" expanded="true" />
<element signature="e#1501#1502#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/SheetMetal.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1071">
<caret line="75" column="92" lean-forward="false" selection-start-line="75" selection-start-column="92" selection-end-line="75" selection-end-column="92" />
<folding>
<element signature="e#0#2804#0" expanded="true" />
<element signature="e#1396#1397#0" expanded="true" />
<element signature="e#1480#1481#0" expanded="true" />
<element signature="e#1652#1653#0" expanded="true" />
<element signature="e#1742#1743#0" expanded="true" />
<element signature="e#1942#1943#0" expanded="true" />
<element signature="e#2026#2027#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Part.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="11" column="3" lean-forward="false" selection-start-line="11" selection-start-column="3" selection-end-line="11" selection-end-column="3" />
<folding>
<element signature="e#0#372#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/MachineDriver.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1462">
<caret line="92" column="10" lean-forward="false" selection-start-line="92" selection-start-column="10" selection-end-line="92" selection-end-column="10" />
<folding>
<element signature="e#0#3520#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Duplicate.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1326">
<caret line="88" column="98" lean-forward="false" selection-start-line="88" selection-start-column="98" selection-end-line="88" selection-end-column="98" />
<folding>
<element signature="e#0#3428#0" expanded="true" />
<element signature="e#2182#2183#0" expanded="true" />
<element signature="e#2256#2257#0" expanded="true" />
<element signature="e#2427#2428#0" expanded="true" />
<element signature="e#2491#2492#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Bolt.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="748">
<caret line="52" column="55" lean-forward="false" selection-start-line="52" selection-start-column="55" selection-end-line="52" selection-end-column="55" />
<folding>
<element signature="e#0#2422#0" expanded="true" />
<element signature="e#1135#1136#0" expanded="true" />
<element signature="e#1204#1205#0" expanded="true" />
<element signature="e#1360#1361#0" expanded="true" />
<element signature="e#1428#1429#0" expanded="true" />
<element signature="e#1621#1622#0" expanded="true" />
<element signature="e#1709#1710#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/barnestr/Assembly.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="351">
<caret line="86" column="97" lean-forward="false" selection-start-line="86" selection-start-column="97" selection-end-line="86" selection-end-column="97" />
<folding>
<element signature="e#0#3146#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</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>1.8</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>Lab 3</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
<option value="0.6" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

11
Lab 3/Lab 3.iml Normal file
View File

@@ -0,0 +1,11 @@
<?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" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Lab 3/src/barnestr.zip Normal file

Binary file not shown.

View File

@@ -0,0 +1,112 @@
/*
* SE1021
* Spring 2018
* Lab 3 - Interfaces
* Name: Trevor Barnes
* Created: 3/20/18
*/
package barnestr;
import java.text.DecimalFormat;
import java.util.ArrayList;
/**
* Assembly implementation of the Part Interface. Represents a collection of parts and duplicates
*
* @author Trevor Barnes
* @version 1.0
*/
public class Assembly implements Part {
private final String name;
private ArrayList<Part> subParts = new ArrayList<>();
/**
* The additional fee charged with sub parts
*/
public static final double USD_PER_SUB_PART = 0.25;
private final DecimalFormat costFormat = new DecimalFormat("$#0.00");
private final DecimalFormat weightFormat = new DecimalFormat("#.### lbs");
/**
* Initializes the variables of an Assembly with a name passed in
*
* @param name name of the assembly
*/
public Assembly(String name) {
this.name = name;
}
/**
* Adds a part to the subParts ArrayList
*
* @param part Part to be added
*/
public void addPart(Part part) {
subParts.add(part);
}
/**
* Calculates the cost of all the parts combined in the subParts ArrayList
*
* @return cost as a double
*/
@Override
public double getCost() {
double cost = 0.0;
for (int i = 0; i < subParts.size(); i++) {
cost += subParts.get(i).getCost() + USD_PER_SUB_PART;
}
return cost;
}
/**
* Returns the name of the Assembly
*
* @return name as a String
*/
@Override
public String getName() {
return name;
}
/**
* Calculates the cost of all the parts combined in the subParts ArrayList
*
* @return weight as a double
*/
@Override
public double getWeight() {
double weight = 0.0;
for (int i = 0; i < subParts.size(); i++) {
weight += subParts.get(i).getWeight();
}
return weight;
}
/**
* Gathers all the information for the Assembly and prints it in a formal bill format as well
* as the total cost/weight and the bill of materials for each part.
*/
@Override
public void printBillOfMaterials() {
System.out.println("==========================\n" +
getName() + "\n" +
"==========================\n");
for (int i = 0; i < subParts.size(); i++) {
System.out.println("Part: " + subParts.get(i).getName() + "\n" +
"Cost: " + costFormat.format(subParts.get(i).getCost()) + "\n" +
"Weight: " + weightFormat.format(subParts.get(i).getWeight()) + "\n"
);
}
System.out.println("Total cost: " + costFormat.format(getCost()) + "\n" +
"Total weight: " + weightFormat.format(getWeight()) + "\n"
);
for (int i = 0; i < subParts.size(); i++) {
if (subParts.get(i) instanceof Duplicate) {
subParts.get(i).printBillOfMaterials();
} else {
subParts.get(i).printBillOfMaterials();
}
}
}
}

View File

@@ -0,0 +1,87 @@
/*
* SE1021
* Spring 2018
* Lab 3 - Interfaces
* Name: Trevor Barnes
* Created: 3/20/18
*/
package barnestr;
import java.text.DecimalFormat;
/**
* Bolt implementation of the Part Interface
*
* @author Trevor Barnes
* @version 1.0
*/
public class Bolt implements Part {
/**
* The weight multiplier for bolt
*/
public static final double LBS_MULTIPLIER = 0.05;
/**
* The US dollar cost multiplier for bolt
*/
public static final double USD_MULTIPLIER = 1.00;
private double diameterInches;
private double lengthInches;
/**
* Initializes the variable of a bolt with two double values passed in
*
* @param diameterInches diameter in inches of a bolt
* @param lengthInches length in inches of a bolt
*/
public Bolt(double diameterInches, double lengthInches) {
this.diameterInches = diameterInches;
this.lengthInches = lengthInches;
}
/**
* Calculates the cost of the bolt based on its size and US dollar multiplier
*
* @return calculated cost as a double
*/
@Override
public double getCost() {
return USD_MULTIPLIER * diameterInches * lengthInches;
}
/**
* Returns the formal size prefixed name for a bolt
*
* @return name as a String
*/
@Override
public String getName() {
return diameterInches + "x" + lengthInches + " bolt";
}
/**
* Calculates the weight of the bolt based on its size and LBS multiplier
*
* @return calculated weight as a double
*/
@Override
public double getWeight() {
return LBS_MULTIPLIER * (diameterInches * diameterInches) * lengthInches;
}
/**
* Gathers all the information for the bolt and prints it in a formal bill format
*/
@Override
public void printBillOfMaterials() {
final DecimalFormat costFormat = new DecimalFormat("$#0.00");
final DecimalFormat weightFormat = new DecimalFormat("#.### lbs");
System.out.println("==========================\n" +
getName() + "\n" +
"==========================\n" +
"Diameter: " + diameterInches + " inches\n" +
"Length: " + lengthInches + " inches\n" +
"Cost: " + costFormat.format(getCost()) + "\n" +
"Weight: " + weightFormat.format(getWeight()) + "\n");
}
}

View File

@@ -0,0 +1,108 @@
/*
* SE1021
* Spring 2018
* Lab 3 - Interfaces
* Name: Trevor Barnes
* Created: 3/20/18
*/
package barnestr;
import java.text.DecimalFormat;
/**
* Duplicate implementation of the Part Interface. Represents multiple identical parts
*
* @author Trevor Barnes
* @version 1.0
*/
public class Duplicate implements Part {
/**
* The discount reduction when there are 5-9 duplicates
*/
public static final double REDUCTION_FACTOR1 = 0.95;
/**
* The discount reduction when there are 10 or more duplicates
*/
public static final double REDUCTION_FACTOR2 = 0.90;
/**
* The amount of duplicates required to give a 5% discount
*/
public static final int USD_THRESHOLD1 = 5;
/**
* The amount of duplicates required to give a 10% discount
*/
public static final int USD_THRESHOLD2 = 10;
private final DecimalFormat costFormat = new DecimalFormat("$#0.00");
private final DecimalFormat weightFormat = new DecimalFormat("#.### lbs");
private Part identicalPart;
private int numDuplicates;
/**
* Initializes the variables of a Duplicate with a type and amount and passed in
*
* @param identicalPart the type of part that has duplicates
* @param numDuplicates the amount of duplicate parts
*/
public Duplicate(Part identicalPart, int numDuplicates) {
this.identicalPart = identicalPart;
this.numDuplicates = numDuplicates;
}
/**
* Calculates the cost of the combined duplicates based on the amount of duplicates
*
* @return calculated cost as double
*/
@Override
public double getCost() {
if (numDuplicates < USD_THRESHOLD1) {
return identicalPart.getCost() * numDuplicates;
} else if (numDuplicates < USD_THRESHOLD2) {
return identicalPart.getCost() * numDuplicates * REDUCTION_FACTOR1;
} else {
return identicalPart.getCost() * numDuplicates * REDUCTION_FACTOR2;
}
}
/**
* Returns the formal amount prefixed name for the identical parts
*
* @return name as a String
*/
@Override
public String getName() {
return numDuplicates + " " + identicalPart.getName() + "s";
}
/**
* Calculates the weight of the combined duplicates
*
* @return calculated weight as a double
*/
@Override
public double getWeight() {
return identicalPart.getWeight() * numDuplicates;
}
/**
* Gathers all the information for the Duplicate and prints it in a formal bill format as well
* as the individual part bill of materials
*/
@Override
public void printBillOfMaterials() {
System.out.println("==========================\n" +
numDuplicates + " " + identicalPart.getName() + "s\n" +
"==========================\n" +
"Duplicate part: " + identicalPart.getName() + "\n" +
"Copies: " + numDuplicates + "\n" +
"Individual cost: " + costFormat.format(identicalPart.getCost()) + "\n" +
"Individual weight: " + weightFormat.format(identicalPart.getWeight()) + "\n" +
"\n" +
"Total cost: " + costFormat.format(getCost()) + "\n" +
"Total weight: " + weightFormat.format(getWeight()) + "\n");
identicalPart.printBillOfMaterials();
}
}

View File

@@ -0,0 +1,113 @@
/*
* SE1021
* Spring 2018
* Lab 3 - Interfaces
* Name: Trevor Barnes
* Created: 3/20/18
*/
package barnestr;
import java.util.Scanner;
public class MachineDriver {
/**
* A simple example driver class for the Bill of Materials generator lab.
*
* This example describes the materials needed to build a cube by bolting
* together six pieces of sheet metal.
*
* @param args ignored
*/
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String command = solicitCommand(in);
while(!command.equals("quit")) {
if(command.equals("fan")) {
buildFan();
} else if(command.equals("cube")) {
buildCube();
} else if(command.equals("shovel")) {
buildShovel();
} else {
System.out.println("Unrecognized command: "+command);
}
command = solicitCommand(in);
}
}
/**
* Prints out the main menu and allows the user to choose an
* option from that menu
* @param in A scanner which should point to System.in
* @return The keyword the user typed
*/
private static String solicitCommand(Scanner in) {
System.out.println("Please enter an option:");
System.out.println(" fan - Build a five-bladed fan");
System.out.println(" cube - Build a cube");
System.out.println(" shovel - Build a shovel");
System.out.println(" quit - exit the program");
return in.next();
}
/**
* Builds a fan consisting of five blades.
* See example output near the start of the lab.
*/
private static void buildFan() {
System.out.println("Building a fan");
SheetMetal blade = new SheetMetal(8,6,0.0625);
Duplicate fan = new Duplicate(blade,5);
fan.printBillOfMaterials();
}
/**
* Builds a shovel consisting of a handle
* and a blade, both made out of sheet metal.
* (The handle is rolled into a tube, though
* extrusion would probably work better.)
*/
private static void buildShovel() {
System.out.println("Building a shovel");
System.out.println("TODO: Uncomment to enable example");
SheetMetal handle = new SheetMetal(30,3,0.125);
SheetMetal blade = new SheetMetal(10,8,0.25);
Bolt bolt = new Bolt(0.125, 0.5);
Assembly shovel = new Assembly("Shovel");
shovel.addPart(handle);
shovel.addPart(blade);
shovel.addPart(bolt);
shovel.printBillOfMaterials();
}
/**
* Builds a cube. The cube consists of six sides,
* bolted together.
*
* See the diagram in the lab handout which shows
* how the different parts belong to one another
*/
private static void buildCube() {
System.out.println("Building a cube");
//System.out.println("TODO: Uncomment to enable example");
Bolt bolt = new Bolt(0.25,2);
Nut nut = new Nut(0.25);
SheetMetal sheet = new SheetMetal(12,12,0.25);
Duplicate sides = new Duplicate(sheet,6);
Assembly nutBoltCombo = new Assembly("Nut-Bolt Pair");
nutBoltCombo.addPart(bolt);
nutBoltCombo.addPart(nut);
Duplicate nutsAndBolts = new Duplicate(nutBoltCombo,36);
Assembly cube = new Assembly("Cube");
cube.addPart(nutsAndBolts);
cube.addPart(sides);
cube.printBillOfMaterials();
}
}

View File

@@ -0,0 +1,83 @@
/*
* SE1021
* Spring 2018
* Lab 3 - Interfaces
* Name: Trevor Barnes
* Created: 3/20/18
*/
package barnestr;
import java.text.DecimalFormat;
/**
* Nut implementation of the Part Interface
*
* @author Trevor Barnes
* @version 1.0
*/
public class Nut implements Part {
/**
* The weight multiplier for a nut
*/
public static final double LBS_MULTIPLIER = 0.01;
/**
* The US dollar cost multiplier for a nut
*/
public static final double USD_MULTIPLIER = 0.50;
private double diameterInches;
/**
* Initializes the variable of a nut with a double value passed in
*
* @param diameterInches diameter in inches of a nut
*/
public Nut(double diameterInches) {
this.diameterInches = diameterInches;
}
/**
* Calculates the cost of the nut based on its size and US dollar multiplier
*
* @return calculated cost as a double
*/
@Override
public double getCost() {
return USD_MULTIPLIER * diameterInches;
}
/**
* Returns the formal size prefixed name for a nut
*
* @return name as a String
*/
@Override
public String getName() {
return diameterInches + " inch nut";
}
/**
* Calculates the weight of the nut based on its size and LBS multiplier
*
* @return calculated weight as a double
*/
@Override
public double getWeight() {
return LBS_MULTIPLIER * (diameterInches * diameterInches);
}
/**
* Gathers all the information for the nut and prints it in a formal bill format
*/
@Override
public void printBillOfMaterials() {
final DecimalFormat costFormat = new DecimalFormat("$#0.00");
final DecimalFormat weightFormat = new DecimalFormat("#.### lbs");
System.out.println("==========================\n" +
getName() + "\n" +
"==========================\n" +
"Diameter: " + diameterInches + " inches\n" +
"Cost: " + costFormat.format(getCost()) + "\n" +
"Weight: " + weightFormat.format(getWeight()) + "\n");
}
}

View File

@@ -0,0 +1,24 @@
/*
* SE1021
* Spring 2018
* Lab 3 - Interfaces
* Name: Trevor Barnes
* Created: 3/20/18
*/
package barnestr;
/**
* The interface for any class that implements the methods getCost, getName, getWeight,
* and printBillOfMaterials
*/
public interface Part {
double getCost();
String getName();
double getWeight();
void printBillOfMaterials();
}

View File

@@ -0,0 +1,91 @@
/*
* SE1021
* Spring 2018
* Lab 3 - Interfaces
* Name: Trevor Barnes
* Created: 3/20/18
*/
package barnestr;
import java.text.DecimalFormat;
/**
* Sheet Metal implementation of the Part Interface
*
* @author Trevor Barnes
* @version 1.0
*/
public class SheetMetal implements Part {
/**
* The weight multiplier for sheet metal
*/
public static final double LBS_MULTIPLIER = 0.1;
/**
* The US dollar cost multiplier for sheet metal
*/
public static final double USD_MULTIPLIER = 0.50;
private double lengthInches;
private double thicknessInches;
private double widthInches;
/**
* Initializes the variables of a piece of sheet metal with three double values passed in
*
* @param lengthInches length in inches of a piece of sheet metal
* @param widthInches width in inches of a piece of sheet metal
* @param thicknessInches thickness in inches of a piece of sheet metal
*/
public SheetMetal(double lengthInches, double widthInches, double thicknessInches) {
this.lengthInches = lengthInches;
this.widthInches = widthInches;
this.thicknessInches = thicknessInches;
}
/**
* Calculates the cost of the sheet metal based on its size and US dollar multiplier
*
* @return calculated cost as a double
*/
@Override
public double getCost() {
return USD_MULTIPLIER * thicknessInches * widthInches * lengthInches;
}
/**
* Returns the formal size prefixed name for a piece of sheet metal
*
* @return name as a String
*/
@Override
public String getName() {
return lengthInches + "x" + widthInches + "x" + thicknessInches + " sheet";
}
/**
* Calculates the weight of the sheet metal based on its size and LBS multiplier
*
* @return calculated weight as a double
*/
@Override
public double getWeight() {
return LBS_MULTIPLIER * thicknessInches * widthInches * lengthInches;
}
/**
* Gathers all the information for the sheet metal and prints it in a formal bill format
*/
@Override
public void printBillOfMaterials() {
final DecimalFormat costFormat = new DecimalFormat("$#0.00");
final DecimalFormat weightFormat = new DecimalFormat("#.### lbs");
System.out.println("==========================\n" +
getName() + "\n" +
"==========================\n" +
"Length: " + lengthInches + " inches\n" +
"Width: " + widthInches + " inches\n" +
"Thickness: " + thicknessInches + " inches\n" +
"Cost: " + costFormat.format(getCost()) + "\n" +
"Weight: " + weightFormat.format(getWeight()) + "\n");
}
}