first commit
This commit is contained in:
1
Lab 2/.idea/.name
generated
Normal file
1
Lab 2/.idea/.name
generated
Normal file
@@ -0,0 +1 @@
|
||||
Lab2
|
||||
18
Lab 2/.idea/checkstyle-idea.xml
generated
Normal file
18
Lab 2/.idea/checkstyle-idea.xml
generated
Normal 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>
|
||||
6
Lab 2/.idea/checkstyleidea-libs/readme.txt
generated
Normal file
6
Lab 2/.idea/checkstyleidea-libs/readme.txt
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
This folder contains libraries copied from the "Lab2" 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 2/.idea/misc.xml
generated
Normal file
6
Lab 2/.idea/misc.xml
generated
Normal 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 2/.idea/modules.xml
generated
Normal file
8
Lab 2/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/Lab2.iml" filepath="$PROJECT_DIR$/Lab2.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
542
Lab 2/.idea/workspace.xml
generated
Normal file
542
Lab 2/.idea/workspace.xml
generated
Normal file
@@ -0,0 +1,542 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="c958db80-9f64-4601-9be1-39556363ca98" 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="Main.java" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Main.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="6" column="3" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="6" selection-end-column="3" />
|
||||
<folding>
|
||||
<element signature="e#0#4500#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Reference.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Reference.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="96">
|
||||
<caret line="17" column="13" lean-forward="false" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="13" />
|
||||
<folding>
|
||||
<element signature="e#0#2308#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="ReferenceHolder.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/ReferenceHolder.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="14" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Book.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Book.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="14" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Article.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Article.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="14" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="FileTemplateManagerImpl">
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<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/Reference.java" />
|
||||
<option value="$PROJECT_DIR$/src/barnestr/ReferenceHolder.java" />
|
||||
<option value="$PROJECT_DIR$/src/barnestr/Book.java" />
|
||||
<option value="$PROJECT_DIR$/src/barnestr/Article.java" />
|
||||
<option value="$PROJECT_DIR$/src/barnestr/Main.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">
|
||||
<option name="x" value="-7" />
|
||||
<option name="width" value="974" />
|
||||
<option name="height" value="1047" />
|
||||
</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="AndroidView" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<expand>
|
||||
<path>
|
||||
<item name="Lab2" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="Lab 2" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="Lab2" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="Lab 2" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="Lab2" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="Lab 2" 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="Scratches" />
|
||||
<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="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.Main">
|
||||
<configuration name="Main" 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.Main" />
|
||||
<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="Lab2" />
|
||||
<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.Main" />
|
||||
</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="c958db80-9f64-4601-9be1-39556363ca98" name="Default" comment="" />
|
||||
<created>1521051761641</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1521051761641</updated>
|
||||
<workItem from="1521051766138" duration="6552000" />
|
||||
<workItem from="1521143896055" duration="14053000" />
|
||||
<workItem from="1521656743233" duration="70000" />
|
||||
<workItem from="1522110791262" duration="1227000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="21902000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-7" y="0" width="974" height="1047" extended-state="0" />
|
||||
<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="5" 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="10" side_tool="false" content_ui="tabs" />
|
||||
<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="1" 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="6" 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="0" 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="0" 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.32873806" sideWeight="0.5" order="6" 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="1" 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="2" 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="3" 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="0" 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="1" 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.20876826" sideWeight="0.5" order="4" 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="2" 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="5" 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="7" 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="4" 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="7" 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="3" 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="8" 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="4" 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="6" 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="8" 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.33" sideWeight="0.5" order="11" 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="9" 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="5" 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 />
|
||||
<watches-manager />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Main.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#4500#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/ReferenceHolder.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="14" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Book.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="14" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Article.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="14" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Reference.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="14" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
|
||||
<folding>
|
||||
<element signature="e#0#2308#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Main.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1870">
|
||||
<caret line="110" column="0" lean-forward="true" selection-start-line="110" selection-start-column="0" selection-end-line="110" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#0#4500#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/ReferenceHolder.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="578">
|
||||
<caret line="34" column="96" lean-forward="true" selection-start-line="34" selection-start-column="96" selection-end-line="34" selection-end-column="96" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Book.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="357">
|
||||
<caret line="21" column="95" lean-forward="true" selection-start-line="21" selection-start-column="95" selection-end-line="21" selection-end-column="95" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Article.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1156">
|
||||
<caret line="68" column="7" lean-forward="false" selection-start-line="68" selection-start-column="7" selection-end-line="68" selection-end-column="7" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Reference.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1360">
|
||||
<caret line="88" column="5" lean-forward="true" selection-start-line="88" selection-start-column="5" selection-end-line="88" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="e#0#2308#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Main.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1717">
|
||||
<caret line="101" column="27" lean-forward="false" selection-start-line="101" selection-start-column="27" selection-end-line="101" selection-end-column="27" />
|
||||
<folding>
|
||||
<element signature="e#0#4500#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Reference.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="68">
|
||||
<caret line="4" column="13" lean-forward="false" selection-start-line="4" selection-start-column="13" selection-end-line="4" selection-end-column="13" />
|
||||
<folding>
|
||||
<element signature="e#0#2308#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/ReferenceHolder.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="391">
|
||||
<caret line="23" column="32" lean-forward="false" selection-start-line="23" selection-start-column="32" selection-end-line="23" selection-end-column="32" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Book.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="238">
|
||||
<caret line="14" column="54" lean-forward="false" selection-start-line="14" selection-start-column="54" selection-end-line="14" selection-end-column="54" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Article.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="306">
|
||||
<caret line="18" column="24" lean-forward="false" selection-start-line="18" selection-start-column="24" selection-end-line="18" selection-end-column="24" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://C:/Program Files/Java/jdk1.8.0_144/src.zip!/java/lang/Object.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="185">
|
||||
<caret line="51" column="30" lean-forward="false" selection-start-line="51" selection-start-column="28" selection-end-line="51" selection-end-column="30" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Book.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="14" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Article.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="14" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Reference.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="96">
|
||||
<caret line="17" column="13" lean-forward="false" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="13" />
|
||||
<folding>
|
||||
<element signature="e#0#2308#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/ReferenceHolder.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="14" lean-forward="false" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/barnestr/Main.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="6" column="3" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="6" selection-end-column="3" />
|
||||
<folding>
|
||||
<element signature="e#0#4500#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
</project>
|
||||
11
Lab 2/Lab2.iml
Normal file
11
Lab 2/Lab2.iml
Normal 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>
|
||||
146
Lab 2/SE1021_checkStyle - v3.xml
Normal file
146
Lab 2/SE1021_checkStyle - v3.xml
Normal file
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
||||
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
||||
|
||||
|
||||
<module name="Checker">
|
||||
<!--
|
||||
If you set the basedir property below, then all reported file
|
||||
names will be relative to the specified directory. See
|
||||
http://checkstyle.sourceforge.net/5.x/config.html#Checker
|
||||
<property name="basedir" value="${basedir}"/>
|
||||
-->
|
||||
|
||||
<property name="fileExtensions" value="java, properties, xml"/>
|
||||
|
||||
|
||||
<!-- See http://checkstyle.sf.net/config_sizes.html -->
|
||||
<module name="FileLength"/>
|
||||
|
||||
<!-- Checks for whitespace -->
|
||||
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
|
||||
<module name="FileTabCharacter"/>
|
||||
|
||||
|
||||
|
||||
<!-- Checks for Headers -->
|
||||
<module name="RegexpHeader">
|
||||
<property name="header" value= "/\*\n \* SE1021"/>
|
||||
</module>
|
||||
|
||||
<module name="TreeWalker">
|
||||
|
||||
|
||||
|
||||
<!-- Checks for Javadoc comments. -->
|
||||
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
|
||||
<module name="JavadocMethod">
|
||||
<property name="minLineCount" value="1"/>
|
||||
<property name="scope" value="public"/>
|
||||
<property name="allowMissingPropertyJavadoc" value="true"/>
|
||||
<property name="ignoreMethodNamesRegex" value="main"/>
|
||||
<property name="allowedAnnotations" value=" "/>
|
||||
</module>
|
||||
<module name="JavadocType">
|
||||
<property name="authorFormat" value="\S"/>
|
||||
<property name="versionFormat" value="\S"/>
|
||||
</module>
|
||||
<module name="JavadocVariable">
|
||||
<property name="scope" value="public"/>
|
||||
</module>
|
||||
<module name="JavadocStyle">
|
||||
<property name="checkFirstSentence" value="false"/>
|
||||
<property name="checkEmptyJavadoc" value="true"/>
|
||||
</module>
|
||||
|
||||
<!-- Checks for Naming Conventions. -->
|
||||
<!-- See http://checkstyle.sf.net/config_naming.html -->
|
||||
<module name="ConstantName"/>
|
||||
<module name="LocalVariableName"/>
|
||||
<module name="MemberName"/>
|
||||
<module name="MethodName"/>
|
||||
<module name="ParameterName"/>
|
||||
<module name="StaticVariableName"/>
|
||||
<module name="TypeName"/>
|
||||
|
||||
<!-- Checks for imports -->
|
||||
<!-- See http://checkstyle.sf.net/config_import.html -->
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
|
||||
<module name="RedundantImport"/>
|
||||
<module name="UnusedImports">
|
||||
<property name="processJavadoc" value="false"/>
|
||||
</module>
|
||||
|
||||
<!-- Checks for Size Violations. -->
|
||||
<!-- See http://checkstyle.sf.net/config_sizes.html -->
|
||||
<module name="LineLength">
|
||||
<property name="max" value="120"/>
|
||||
</module>
|
||||
<module name="MethodLength"/>
|
||||
<module name="ParameterNumber"/>
|
||||
|
||||
<!-- Checks for whitespace -->
|
||||
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
|
||||
<module name="GenericWhitespace"/>
|
||||
<module name="MethodParamPad"/>
|
||||
<module name="NoWhitespaceBefore"/>
|
||||
<module name="ParenPad"/>
|
||||
|
||||
<!-- Modifier Checks -->
|
||||
<!-- See http://checkstyle.sf.net/config_modifier.html -->
|
||||
<module name="ModifierOrder"/>
|
||||
|
||||
<!-- Checks for blocks. You know, those {}'s -->
|
||||
<!-- See http://checkstyle.sf.net/config_blocks.html -->
|
||||
<module name="AvoidNestedBlocks"/>
|
||||
<module name="EmptyBlock"/>
|
||||
<module name="LeftCurly"/>
|
||||
<module name="NeedBraces"/>
|
||||
<module name="RightCurly"/>
|
||||
|
||||
<!-- Checks for common coding problems -->
|
||||
<!-- See http://checkstyle.sf.net/config_coding.html -->
|
||||
<module name="AvoidInlineConditionals"/>
|
||||
<module name="EmptyStatement"/>
|
||||
<module name="EqualsHashCode"/>
|
||||
<module name="IllegalInstantiation"/>
|
||||
<module name="InnerAssignment"/>
|
||||
<module name="MagicNumber">
|
||||
<property name="ignoreNumbers" value="-1, 0, 1, 2, 3, 4"/>
|
||||
<property name="ignoreAnnotation" value="true"/>
|
||||
</module>
|
||||
<module name="SimplifyBooleanExpression"/>
|
||||
<module name="SimplifyBooleanReturn"/>
|
||||
|
||||
<!-- find incomplete autogenerated code -->
|
||||
<module name="TodoComment">
|
||||
<property name="format" value="(TODO)|(FIXME)|(Todo)|(to do)"/>
|
||||
</module>
|
||||
<module name="RegexpSinglelineJava">
|
||||
<property name="format" value=" e\.printStackTrace\(\);"/>
|
||||
<property name="ignoreComments" value="true"/>
|
||||
</module>
|
||||
<module name="RegexpSinglelineJava">
|
||||
<property name="format" value="\* Created by [a-zA-Z 0-9]+ on [0-9]{1,2}/[0-9]{1,2}/[0-9]{4}\."/>
|
||||
<property name="message" value="Autogenerated class comment"/>
|
||||
</module>
|
||||
|
||||
<!-- Miscellaneous other checks. -->
|
||||
<!-- See http://checkstyle.sf.net/config_misc.html -->
|
||||
<module name="UpperEll"/>
|
||||
<module name="MissingOverride"/>
|
||||
<module name="IllegalCatch"/>
|
||||
<module name="IllegalThrows"/>
|
||||
<module name="OneTopLevelClass"/>
|
||||
<module name="Indentation">
|
||||
<property name="arrayInitIndent" value="8"/>
|
||||
<property name="lineWrappingIndentation" value="8"/>
|
||||
</module>
|
||||
|
||||
|
||||
|
||||
</module>
|
||||
|
||||
</module>
|
||||
BIN
Lab 2/out/production/Lab2/barnestr/Article.class
Normal file
BIN
Lab 2/out/production/Lab2/barnestr/Article.class
Normal file
Binary file not shown.
BIN
Lab 2/out/production/Lab2/barnestr/Book.class
Normal file
BIN
Lab 2/out/production/Lab2/barnestr/Book.class
Normal file
Binary file not shown.
BIN
Lab 2/out/production/Lab2/barnestr/Main.class
Normal file
BIN
Lab 2/out/production/Lab2/barnestr/Main.class
Normal file
Binary file not shown.
BIN
Lab 2/out/production/Lab2/barnestr/Reference.class
Normal file
BIN
Lab 2/out/production/Lab2/barnestr/Reference.class
Normal file
Binary file not shown.
BIN
Lab 2/out/production/Lab2/barnestr/ReferenceHolder.class
Normal file
BIN
Lab 2/out/production/Lab2/barnestr/ReferenceHolder.class
Normal file
Binary file not shown.
BIN
Lab 2/src/barnestr.zip
Normal file
BIN
Lab 2/src/barnestr.zip
Normal file
Binary file not shown.
120
Lab 2/src/barnestr/Article.java
Normal file
120
Lab 2/src/barnestr/Article.java
Normal file
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
* SE1021
|
||||
* Spring 2018
|
||||
* Lab 2
|
||||
* Name: Trevor Barnes
|
||||
* Created: 3/19/2018
|
||||
*/
|
||||
package barnestr;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* A type of Reference
|
||||
*
|
||||
* @author Trevor Barnes
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Article extends Reference {
|
||||
private int endingPage;
|
||||
private int startingPage;
|
||||
private String journal;
|
||||
|
||||
/**
|
||||
* This constructor sets up an Article with an author, title, publication year, journal,
|
||||
* starting page, and ending page.
|
||||
*
|
||||
* @param author author of article
|
||||
* @param title title of article
|
||||
* @param publicationYear article's year of publication
|
||||
* @param journal the journal the article is from
|
||||
* @param startingPage the page the article begins
|
||||
* @param endingPage the page the article ends
|
||||
*/
|
||||
public Article(String author, String title, int publicationYear, String journal,
|
||||
int startingPage, int endingPage) {
|
||||
super(author, title, publicationYear);
|
||||
this.journal = journal;
|
||||
if (startingPage < 1) {
|
||||
this.startingPage = 1;
|
||||
} else {
|
||||
this.startingPage = startingPage;
|
||||
}
|
||||
if (endingPage < startingPage) {
|
||||
this.endingPage = startingPage;
|
||||
} else {
|
||||
this.endingPage = endingPage;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides all of the listed properties of the book
|
||||
*
|
||||
* @return String with info
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "@ARTICLE { " + getMyUniqueID() + ",\n" +
|
||||
"author = " + getAuthor() + ",\n" +
|
||||
"title = " + getTitle() + ",\n" +
|
||||
"journal = " + getJournal() + ",\n" +
|
||||
"pages = " + getStartingPage() + "-" + getEndingPage() + ",\n" +
|
||||
"year = " + getPublicationYear() + "\n" +
|
||||
"}\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the parent class' promptForUpdate method and asks for updated journal, starting page,
|
||||
* and ending page values
|
||||
*
|
||||
* @param in Scanner input
|
||||
*/
|
||||
@Override
|
||||
public void promptForUpdate(Scanner in) {
|
||||
super.promptForUpdate(in);
|
||||
//journal
|
||||
System.out.println("Enter updated journal");
|
||||
this.setJournal(in.nextLine());
|
||||
//startingPage
|
||||
System.out.println("Enter the first page of the article.");
|
||||
while (!in.hasNextInt()) {
|
||||
in.next();
|
||||
System.out.println("Enter the first page of the article.");
|
||||
}
|
||||
this.setStartingPage(in.nextInt());
|
||||
in.nextLine();
|
||||
//endingPage
|
||||
System.out.println("Enter the last page of the article.");
|
||||
while (!in.hasNextInt()) {
|
||||
in.next();
|
||||
System.out.println("Enter the last page of the article.");
|
||||
}
|
||||
this.setEndingPage(in.nextInt());
|
||||
in.nextLine();
|
||||
}
|
||||
|
||||
public int getEndingPage() {
|
||||
return endingPage;
|
||||
}
|
||||
|
||||
public void setEndingPage(int endingPage) {
|
||||
this.endingPage = endingPage;
|
||||
}
|
||||
|
||||
public int getStartingPage() {
|
||||
return startingPage;
|
||||
}
|
||||
|
||||
public void setStartingPage(int startingPage) {
|
||||
this.startingPage = startingPage;
|
||||
}
|
||||
|
||||
public String getJournal() {
|
||||
return journal;
|
||||
}
|
||||
|
||||
public void setJournal(String journal) {
|
||||
this.journal = journal;
|
||||
}
|
||||
}
|
||||
68
Lab 2/src/barnestr/Book.java
Normal file
68
Lab 2/src/barnestr/Book.java
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* SE1021
|
||||
* Spring 2018
|
||||
* Lab 2
|
||||
* Name: Trevor Barnes
|
||||
* Created: 3/19/2018
|
||||
*/
|
||||
package barnestr;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* A type of Reference
|
||||
*
|
||||
* @author Trevor Barnes
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Book extends Reference {
|
||||
private String publisher;
|
||||
|
||||
/**
|
||||
* This constructor sets up an Book with an author, title, publication year, and publisher.
|
||||
*
|
||||
* @param author author of book
|
||||
* @param title title of book
|
||||
* @param publicationYear book's year of publication
|
||||
* @param publisher publisher of book
|
||||
*/
|
||||
public Book(String author, String title, int publicationYear, String publisher) {
|
||||
super(author, title, publicationYear);
|
||||
this.publisher = publisher;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides all of the listed properties of the book
|
||||
*
|
||||
* @return String with info
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "@BOOK { \"" + getMyUniqueID() + "\",\n" +
|
||||
"author = \"" + getAuthor() + "\",\n" +
|
||||
"title = \"" + getTitle() + "\",\n" +
|
||||
"publisher = \"" + getPublisher() + "\",\n" +
|
||||
"year = \"" + getPublicationYear() + "\"\n" +
|
||||
"}\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the parent class' promptForUpdate method and asks for updated publisher value
|
||||
*
|
||||
* @param in Scanner input
|
||||
*/
|
||||
@Override
|
||||
public void promptForUpdate(Scanner in) {
|
||||
super.promptForUpdate(in);
|
||||
System.out.println("Enter the updated publisher for the book");
|
||||
this.setPublisher(in.nextLine());
|
||||
}
|
||||
|
||||
public String getPublisher() {
|
||||
return publisher;
|
||||
}
|
||||
|
||||
public void setPublisher(String publisher) {
|
||||
this.publisher = publisher;
|
||||
}
|
||||
}
|
||||
138
Lab 2/src/barnestr/Main.java
Normal file
138
Lab 2/src/barnestr/Main.java
Normal file
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* SE1021
|
||||
* Spring 2018
|
||||
* Lab Lab2
|
||||
* Name: Trevor Barnes
|
||||
* Created 3/19/18
|
||||
*/
|
||||
|
||||
package barnestr;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* A simple test program for SE1021 laboratory assignment 2
|
||||
* @author schilling with minor edits by taylor and riley
|
||||
* @version 1.2-20161130
|
||||
*/
|
||||
|
||||
public class Main {
|
||||
|
||||
/**
|
||||
* This method provides a menu to obtain book and article references and then
|
||||
* display them to the console window.
|
||||
* @param args ignored
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
ReferenceHolder references = new ReferenceHolder();
|
||||
int choice;
|
||||
Scanner in = new Scanner(System.in);
|
||||
|
||||
do {
|
||||
printPrompt();
|
||||
while (!in.hasNextInt()) {
|
||||
in.next();
|
||||
printPrompt();
|
||||
}
|
||||
choice = in.nextInt();
|
||||
in.nextLine(); // consumes the carriage return from the user
|
||||
if(choice == 1) {
|
||||
Book book = createBookEntry(in);
|
||||
references.addReference(book);
|
||||
} else if(choice == 2) {
|
||||
Article article = createArticleEntry(in);
|
||||
references.addReference(article);
|
||||
} else if(choice == 3) {
|
||||
System.out.println("Enter the ID of the reference you want to update");
|
||||
String uniqueID = in.nextLine();
|
||||
references.updateReference(uniqueID,in);
|
||||
} else if(choice == 4) {
|
||||
System.out.print(references);
|
||||
} else {
|
||||
if(choice != 0) {
|
||||
System.out.println("Please select a valid input");
|
||||
}
|
||||
}
|
||||
} while (choice != 0);
|
||||
System.out.println("Goodbye");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method displays main menu to the console.
|
||||
*/
|
||||
private static void printPrompt() {
|
||||
System.out.println("Enter 0 to exit the program.");
|
||||
System.out.println("Enter 1 to enter a new book into the reference set.");
|
||||
System.out.println("Enter 2 to enter a new article into the reference set.");
|
||||
System.out.println("Enter 3 to update a reference.");
|
||||
System.out.println("Enter 4 to printout the entries in Bibtex format.");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will allow the user to enter the information for the book.
|
||||
* @param in This is the keyboard.
|
||||
* @return A book will be returned.
|
||||
*/
|
||||
private static Book createBookEntry(Scanner in) {
|
||||
System.out.println("Enter the author of the book");
|
||||
String author = in.nextLine();
|
||||
|
||||
System.out.println("Enter the title of the book");
|
||||
String title = in.nextLine();
|
||||
|
||||
System.out.println("Enter the publisher for the book.");
|
||||
String publisher = in.nextLine();
|
||||
|
||||
System.out.println("Enter the copyright year for the book.");
|
||||
while(!in.hasNextInt()) {
|
||||
in.next();
|
||||
System.out.println("Enter the copyright year for the book.");
|
||||
}
|
||||
int copyright = in.nextInt();
|
||||
in.nextLine();
|
||||
|
||||
return new Book(author, title, copyright, publisher);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will allow the user to enter the information for an article.
|
||||
* @param in This is the keyboard.
|
||||
* @return An article will be returned.
|
||||
*/
|
||||
private static Article createArticleEntry(Scanner in) {
|
||||
System.out.println("Enter the author of the article");
|
||||
String author = in.nextLine();
|
||||
|
||||
System.out.println("Enter the title of the article");
|
||||
String title = in.nextLine();
|
||||
|
||||
System.out.println("Enter the title of the journal.");
|
||||
String journal = in.nextLine();
|
||||
|
||||
System.out.println("Enter the first page of the article.");
|
||||
while(!in.hasNextInt()) {
|
||||
in.next();
|
||||
System.out.println("Enter the first page of the article.");
|
||||
}
|
||||
int start = in.nextInt();
|
||||
|
||||
System.out.println("Enter the last page of the article.");
|
||||
while(!in.hasNextInt()) {
|
||||
in.next();
|
||||
System.out.println("Enter the last page of the article.");
|
||||
}
|
||||
int end = in.nextInt();
|
||||
in.nextLine();
|
||||
|
||||
System.out.println("Enter the copyright year for the article.");
|
||||
while(!in.hasNextInt()) {
|
||||
in.next();
|
||||
System.out.println("Enter the copyright year for the article.");
|
||||
}
|
||||
int copyright = in.nextInt();
|
||||
in.nextLine();
|
||||
|
||||
return new Article(author, title, copyright, journal, start, end);
|
||||
}
|
||||
|
||||
}
|
||||
94
Lab 2/src/barnestr/Reference.java
Normal file
94
Lab 2/src/barnestr/Reference.java
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* SE1021
|
||||
* Spring 2018
|
||||
* Lab 2
|
||||
* Name: Trevor Barnes
|
||||
* Created: 3/19/2018
|
||||
*/
|
||||
package barnestr;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* The parent class that is inherited by either a book or article
|
||||
*
|
||||
* @author Trevor Barnes
|
||||
* @version 1.0
|
||||
*/
|
||||
public class Reference {
|
||||
private static int instanceCount = 0;
|
||||
private String author;
|
||||
private String myUniqueID;
|
||||
private int publicationYear;
|
||||
String title;
|
||||
|
||||
/**
|
||||
* This constructor sets up a reference with an author, title, and publication year passed in.
|
||||
*
|
||||
* @param author author of reference
|
||||
* @param title title of reference
|
||||
* @param publicationYear reference's year of publication
|
||||
*/
|
||||
public Reference(String author, String title, int publicationYear) {
|
||||
this.author = author;
|
||||
this.title = title;
|
||||
this.publicationYear = publicationYear;
|
||||
this.myUniqueID = "REF" + instanceCount;
|
||||
instanceCount++;
|
||||
}
|
||||
|
||||
/**
|
||||
* Asks for updated values for the author, title, and copyright year.
|
||||
*
|
||||
* @param in scanner input
|
||||
*/
|
||||
public void promptForUpdate(Scanner in) {
|
||||
|
||||
System.out.println("Enter the updated author of the reference");
|
||||
this.setAuthor(in.nextLine());
|
||||
|
||||
System.out.println("Enter the updated title of the reference");
|
||||
this.setTitle(in.nextLine());
|
||||
|
||||
System.out.println("Enter the updated copyright year for the reference.");
|
||||
while (!in.hasNextInt()) {
|
||||
in.next();
|
||||
System.out.println("Enter the updated copyright year for the reference.");
|
||||
}
|
||||
this.setPublicationYear(in.nextInt());
|
||||
in.nextLine();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString();
|
||||
}
|
||||
|
||||
public String getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public String getMyUniqueID() {
|
||||
return myUniqueID;
|
||||
}
|
||||
|
||||
public int getPublicationYear() {
|
||||
return publicationYear;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setAuthor(String author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public void setPublicationYear(int publicationYear) {
|
||||
this.publicationYear = publicationYear;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
}
|
||||
68
Lab 2/src/barnestr/ReferenceHolder.java
Normal file
68
Lab 2/src/barnestr/ReferenceHolder.java
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* SE1021
|
||||
* Spring 2018
|
||||
* Lab 2
|
||||
* Name: Trevor Barnes
|
||||
* Created: 3/19/2018
|
||||
*/
|
||||
package barnestr;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* Creates an ArrayList that holds references of different types
|
||||
*
|
||||
* @author Trevor Barnes
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ReferenceHolder {
|
||||
private ArrayList<Reference> references = new ArrayList();
|
||||
|
||||
public ReferenceHolder() {
|
||||
|
||||
}
|
||||
|
||||
public void addReference(Book book) {
|
||||
references.add(book);
|
||||
}
|
||||
|
||||
public void addReference(Article article) {
|
||||
references.add(article);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the prompt for update methods for a specific type of reference, given the uniqueID.
|
||||
*
|
||||
* @param uniqueID Individual ID for each reference
|
||||
* @param in Scanner input
|
||||
*/
|
||||
public void updateReference(String uniqueID, Scanner in) {
|
||||
for (Reference ref : references) {
|
||||
if (ref.getMyUniqueID().equals(uniqueID)) {
|
||||
if (ref instanceof Book) {
|
||||
ref = (Book) ref;
|
||||
ref.promptForUpdate(in);
|
||||
} else {
|
||||
ref = (Article) ref;
|
||||
ref.promptForUpdate(in);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string of references in the references arrayList
|
||||
*
|
||||
* @return a string of references
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (Reference ref : references) {
|
||||
stringBuilder.append(ref.toString());
|
||||
}
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user