Commit 767bbb10 authored by Ali Shakoori's avatar Ali Shakoori

initial and final commit of lab7

parents
Pipeline #541 failed with stages
<component name="libraryTable">
<library name="Arquillian JUnit:Release" type="repository">
<properties maven-id="org.jboss.arquillian.junit:arquillian-junit-container:RELEASE" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/junit/arquillian-junit-container/1.4.1.Final/arquillian-junit-container-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/junit/arquillian-junit-core/1.4.1.Final/arquillian-junit-core-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/test/arquillian-test-api/1.4.1.Final/arquillian-test-api-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/core/arquillian-core-api/1.4.1.Final/arquillian-core-api-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/test/arquillian-test-spi/1.4.1.Final/arquillian-test-spi-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/core/arquillian-core-spi/1.4.1.Final/arquillian-core-spi-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/container/arquillian-container-test-api/1.4.1.Final/arquillian-container-test-api-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/shrinkwrap/shrinkwrap-api/1.2.6/shrinkwrap-api-1.2.6.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api-base/2.0.0/shrinkwrap-descriptors-api-base-2.0.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/container/arquillian-container-test-spi/1.4.1.Final/arquillian-container-test-spi-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/container/arquillian-container-spi/1.4.1.Final/arquillian-container-spi-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/core/arquillian-core-impl-base/1.4.1.Final/arquillian-core-impl-base-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/test/arquillian-test-impl-base/1.4.1.Final/arquillian-test-impl-base-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/container/arquillian-container-impl-base/1.4.1.Final/arquillian-container-impl-base-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/config/arquillian-config-api/1.4.1.Final/arquillian-config-api-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/config/arquillian-config-impl-base/1.4.1.Final/arquillian-config-impl-base-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/config/arquillian-config-spi/1.4.1.Final/arquillian-config-spi-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-spi/2.0.0/shrinkwrap-descriptors-spi-2.0.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/arquillian/container/arquillian-container-test-impl-base/1.4.1.Final/arquillian-container-test-impl-base-1.4.1.Final.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/shrinkwrap/shrinkwrap-impl-base/1.2.6/shrinkwrap-impl-base-1.2.6.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/jboss/shrinkwrap/shrinkwrap-spi/1.2.6/shrinkwrap-spi-1.2.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_10" default="false" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Lab_7.iml" filepath="$PROJECT_DIR$/Lab_7.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="7a6d7658-a499-48d1-98fe-ad5c1b9efccd" name="Default Changelist" comment="" />
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FUSProjectUsageTrigger">
<session id="-663001841">
<usages-collector id="statistics.lifecycle.project">
<counts>
<entry key="project.open.time.5" value="1" />
<entry key="project.opened" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="gitignore" value="1" />
<entry key="java" value="9" />
<entry key="md" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="JAVA" value="9" />
<entry key="Markdown" value="1" />
<entry key="PLAIN_TEXT" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="gitignore" value="5" />
<entry key="java" value="1933" />
<entry key="md" value="92" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="JAVA" value="1933" />
<entry key="Markdown" value="92" />
<entry key="PLAIN_TEXT" value="5" />
</counts>
</usages-collector>
</session>
</component>
<component name="FileEditorManager">
<leaf>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Flight.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="292">
<caret line="61" column="29" selection-start-line="61" selection-start-column="29" selection-end-line="61" selection-end-column="29" />
<folding>
<element signature="e#361#362#0" expanded="true" />
<element signature="e#388#389#0" expanded="true" />
<element signature="e#426#427#0" expanded="true" />
<element signature="e#463#464#0" expanded="true" />
<element signature="e#500#501#0" expanded="true" />
<element signature="e#531#532#0" expanded="true" />
<element signature="e#563#564#0" expanded="true" />
<element signature="e#591#592#0" expanded="true" />
<element signature="e#625#626#0" expanded="true" />
<element signature="e#655#656#0" expanded="true" />
<element signature="e#686#687#0" expanded="true" />
<element signature="e#713#714#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Customer.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="15" selection-start-line="4" selection-start-column="3" selection-end-line="5" selection-end-column="15" />
<folding>
<element signature="e#667#668#0" expanded="true" />
<element signature="e#692#693#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/CustomerTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="23">
<caret line="16" column="55" selection-start-line="16" selection-start-column="55" selection-end-line="16" selection-end-column="55" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Order.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="411">
<caret line="87" selection-start-line="87" selection-end-line="87" />
<folding>
<element signature="e#696#697#0" expanded="true" />
<element signature="e#725#726#0" expanded="true" />
<element signature="e#770#771#0" expanded="true" />
<element signature="e#798#799#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Seat.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="275">
<caret line="50" column="7" selection-start-line="50" selection-start-column="7" selection-end-line="50" selection-end-column="7" />
<folding>
<element signature="e#620#621#0" expanded="true" />
<element signature="e#643#644#0" expanded="true" />
<element signature="e#547#548#0" expanded="true" />
<element signature="e#576#577#0" expanded="true" />
<element signature="e#609#610#0" expanded="true" />
<element signature="e#637#638#0" expanded="true" />
<element signature="e#684#685#0" expanded="true" />
<element signature="e#725#726#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/AirPlane.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="411">
<caret line="41" selection-start-line="41" selection-end-line="41" />
<folding>
<element signature="e#328#329#0" expanded="true" />
<element signature="e#359#360#0" expanded="true" />
<element signature="e#400#401#0" expanded="true" />
<element signature="e#428#429#0" expanded="true" />
<element signature="e#459#460#0" expanded="true" />
<element signature="e#486#487#0" expanded="true" />
<element signature="e#520#521#0" expanded="true" />
<element signature="e#550#551#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/System.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="29" column="33" selection-start-line="29" selection-start-column="33" selection-end-line="29" selection-end-column="33" />
<folding>
<element signature="e#147#148#0" expanded="true" />
<element signature="e#174#175#0" expanded="true" />
<element signature="e#237#238#0" expanded="true" />
<element signature="e#272#273#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="17">
<caret line="1" column="61" selection-start-line="1" selection-start-column="61" selection-end-line="1" selection-end-column="61" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="5" selection-start-column="5" selection-end-column="5" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Class" />
</list>
</option>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/CustomerTest.java" />
<option value="$PROJECT_DIR$/src/Flight.java" />
<option value="$PROJECT_DIR$/src/Customer.java" />
<option value="$PROJECT_DIR$/src/Order.java" />
<option value="$PROJECT_DIR$/src/Seat.java" />
<option value="$PROJECT_DIR$/src/AirPlane.java" />
<option value="$PROJECT_DIR$/src/System.java" />
<option value="$PROJECT_DIR$/src/README.md" />
<option value="$PROJECT_DIR$/src/.gitignore" />
</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="85" />
<option name="y" value="25" />
<option name="width" value="1750" />
<option name="height" value="970" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="Lab_7" type="b2602c69:ProjectViewProjectNode" />
<item name="Lab_7" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="PackagesPane" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="Downloaded.Files.Path.Enabled" value="false" />
<property name="Repository.Attach.JavaDocs" value="false" />
<property name="Repository.Attach.Sources" value="false" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1556460359351" />
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="Arquillian JUnit4" />
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.Arquillian JUnit4" value="" />
<property name="create.test.in.the.same.root" value="true" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
</component>
<component name="RecentsManager">
<key name="CreateTestDialog.RecentsKey">
<recent name="" />
</key>
<key name="CreateTestDialog.Recents.Supers">
<recent name="" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="JUnit.CustomerTest.testCustomerAddOrder">
<configuration name="CustomerTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="Lab_7" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="CustomerTest" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="CustomerTest.testCustomerAddOrder" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="Lab_7" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="CustomerTest" />
<option name="METHOD_NAME" value="testCustomerAddOrder" />
<option name="TEST_OBJECT" value="method" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="JUnit.CustomerTest" />
<item itemvalue="JUnit.CustomerTest.testCustomerAddOrder" />
</list>
<recent_temporary>
<list>
<item itemvalue="JUnit.CustomerTest.testCustomerAddOrder" />
<item itemvalue="JUnit.CustomerTest" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="7a6d7658-a499-48d1-98fe-ad5c1b9efccd" name="Default Changelist" comment="" />
<created>1556455474841</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1556455474841</updated>
<workItem from="1556455480417" duration="4870000" />
</task>
<servers />
</component>
<component name="TestHistory">
<history-entry file="CustomerTest - 2019.04.28 at 17h 21m 07s.xml">
<configuration name="CustomerTest" configurationId="JUnit" />
</history-entry>
<history-entry file="CustomerTest - 2019.04.28 at 17h 31m 49s.xml">
<configuration name="CustomerTest" configurationId="JUnit" />
</history-entry>
<history-entry file="CustomerTest - 2019.04.28 at 17h 34m 45s.xml">
<configuration name="CustomerTest" configurationId="JUnit" />
</history-entry>
<history-entry file="CustomerTest - 2019.04.28 at 17h 36m 13s.xml">
<configuration name="CustomerTest" configurationId="JUnit" />
</history-entry>
<history-entry file="CustomerTest_testCustomerAddOrder - 2019.04.28 at 17h 36m 32s.xml">
<configuration name="CustomerTest.testCustomerAddOrder" configurationId="JUnit" />
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="4870000" />
</component>
<component name="ToolWindowManager">
<frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Image Layers" />
<window_info id="Designer" />
<window_info id="UI Designer" />
<window_info id="Capture Tool" />
<window_info id="Favorites" side_tool="true" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.24966443" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Messages" />
<window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
<window_info anchor="bottom" id="Terminal" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.30070922" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="right" id="Palette" />
<window_info anchor="right" id="Theme Preview" />
<window_info anchor="right" id="Capture Analysis" />
<window_info anchor="right" id="Palette&#9;" />
<window_info anchor="right" id="Database" />
<window_info anchor="right" id="Maven Projects" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/CustomerTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="23">
<caret line="16" column="55" selection-start-line="16" selection-start-column="55" selection-end-line="16" selection-end-column="55" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Flight.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="292">
<caret line="61" column="29" selection-start-line="61" selection-start-column="29" selection-end-line="61" selection-end-column="29" />
<folding>
<element signature="e#361#362#0" expanded="true" />
<element signature="e#388#389#0" expanded="true" />
<element signature="e#426#427#0" expanded="true" />
<element signature="e#463#464#0" expanded="true" />
<element signature="e#500#501#0" expanded="true" />
<element signature="e#531#532#0" expanded="true" />
<element signature="e#563#564#0" expanded="true" />
<element signature="e#591#592#0" expanded="true" />
<element signature="e#625#626#0" expanded="true" />
<element signature="e#655#656#0" expanded="true" />
<element signature="e#686#687#0" expanded="true" />
<element signature="e#713#714#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Seat.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="275">
<caret line="50" column="7" selection-start-line="50" selection-start-column="7" selection-end-line="50" selection-end-column="7" />
<folding>
<element signature="e#620#621#0" expanded="true" />
<element signature="e#643#644#0" expanded="true" />
<element signature="e#547#548#0" expanded="true" />
<element signature="e#576#577#0" expanded="true" />
<element signature="e#609#610#0" expanded="true" />
<element signature="e#637#638#0" expanded="true" />
<element signature="e#684#685#0" expanded="true" />
<element signature="e#725#726#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Customer.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="15" selection-start-line="4" selection-start-column="3" selection-end-line="5" selection-end-column="15" />
<folding>
<element signature="e#667#668#0" expanded="true" />
<element signature="e#692#693#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Order.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="411">
<caret line="87" selection-start-line="87" selection-end-line="87" />
<folding>
<element signature="e#696#697#0" expanded="true" />
<element signature="e#725#726#0" expanded="true" />
<element signature="e#770#771#0" expanded="true" />
<element signature="e#798#799#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/AirPlane.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="411">
<caret line="41" selection-start-line="41" selection-end-line="41" />
<folding>
<element signature="e#328#329#0" expanded="true" />
<element signature="e#359#360#0" expanded="true" />
<element signature="e#400#401#0" expanded="true" />
<element signature="e#428#429#0" expanded="true" />
<element signature="e#459#460#0" expanded="true" />
<element signature="e#486#487#0" expanded="true" />
<element signature="e#520#521#0" expanded="true" />
<element signature="e#550#551#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/System.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="29" column="33" selection-start-line="29" selection-start-column="33" selection-end-line="29" selection-end-column="33" />
<folding>
<element signature="e#147#148#0" expanded="true" />
<element signature="e#174#175#0" expanded="true" />
<element signature="e#237#238#0" expanded="true" />
<element signature="e#272#273#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="17">
<caret line="1" column="61" selection-start-line="1" selection-start-column="61" selection-end-line="1" selection-end-column="61" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="5" selection-start-column="5" selection-end-column="5" />
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
<?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" />
<orderEntry type="library" name="Arquillian JUnit:Release" level="project" />
<orderEntry type="module-library">
<library name="JUnit5.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-api/5.5.0-M1/junit-jupiter-api-5.5.0-M1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/opentest4j/opentest4j/1.1.1/opentest4j-1.1.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-commons/1.5.0-M1/junit-platform-commons-1.5.0-M1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
\ No newline at end of file
.idea
\ No newline at end of file
import java.util.ArrayList;
/**
* Getting the details of Flight
* @author Milad & Ali
* @version 1.0
*/
public class AirPlane {
private String company;
private String kind;
private ArrayList<Seat> seats ;
/**
* @param company company of Airplane
* @param kind kind of Airplane
*/
public AirPlane (String company , String kind){
this.company = company;
this.kind = kind;
seats = new ArrayList<>();
}
/**
* @param seat the seat for adding to Airplane seats
*/
public void addSeat (Seat seat){
seats.add(seat);
}
public ArrayList<Seat> getSeats() {
return seats;
}
public String getKind() {
return kind;
}
public String getCompany() {
return company;
}
}
import java.util.ArrayList;
/**
* Getting the information of customer
* @author Milad & Ali
* @version 1.0
*/
public class Customer {
private String name;
private String ID;
private int balance;
private ArrayList<Order> orders ;
/**
* @param name name of customer
* @param ID ID of customer
* @param balance balance of customer
*/
public Customer (String name , String ID , int balance){
this.ID = ID;
this.name = name;
this.balance = balance;
orders = new ArrayList<>();
}
/**
* adding the balance of customer
* @param money money to be added to balance of customer
*/
public void addBalance(int money){
this.balance += money;
}
/**
* @param order order for adding to customer's orders
*/
public void addOrder (Order order){
this.orders.add(order);
}
/**
* @return an Arraylist of customer's orders
*/
public ArrayList<Order> getOrders() {
return orders;
}
/**
* @return balance of customer
*/
public int getBalance() {
return balance;
}
/**
* @return getting the ID of customer
*/
public String getID() {
return ID;
}
/**
* @return getting the name of customer
*/
public String getName() {
return name;
}
/**
* Check if price of order is lesser than the balance
* of customer to add it to customer orders
* @param order order to add to Arraylist
*/
public void submitOrder(Order order){
if (order.calculateOrderPrice() > balance)
return;
if (order.getStatus().equals("submitted"))
return;
order.setPendingToSubmitted();
this.balance -= order.calculateOrderPrice();
ArrayList <Seat> help = order.getSeats();
ArrayList <Seat> help2 = order.getFlight().getAirplane().getSeats();
for (int i = 0; i < help.size(); i++) {
for (int j = 0; j < help2.size(); j++) {
if (help2.get(j).getSeatNum() == help.get(i).getSeatNum()){
help2.get(j).setPendingToSubmitted();
break;
}
}
}
}
}
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeAll;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class CustomerTest {
static Customer customer;
static Customer customer2;
@BeforeAll
public static void createCustomer(){
customer = new Customer("Milad" , "9731007" , 12000);
customer2 = new Customer("Ali" , "9731092" , 4000);
}
@Test
public void testCustomerGetName(){
assertEquals("Milad", customer.getName());
assertEquals("Ali", customer2.getName());
}
@Test
public void testCustomerAddOrder(){
Seat seat1 = new Seat(1 , "businessclass" , 2000);
Seat seat2 = new Seat(2 , "businessclass" , 2000);
Seat seat3 = new Seat(14 , "normalclass" , 500);
AirPlane airPlane = new AirPlane("airbus","businessClass");
airPlane.addSeat(seat1);
airPlane.addSeat(seat2);
airPlane.addSeat(seat3);
Flight flight = new Flight("Tomorrow" , "00:00" , "Home" , "Tehran" ,"airbus" , airPlane , 45623);
Order order = new Order(flight , 465132);
customer.addOrder(order);
customer2.addOrder(order);
assertEquals(customer.getOrders().get(0) , order);
assertEquals(customer2.getOrders().get(0) , order);
}
}
\ No newline at end of file
/**
*Get details of a trip
* @author Milad & Ali
* @version 1.0
*/
public class Flight {
private String Date;
private String Time;
private String maghsad;
private String mabda;
private AirPlane airplane;
private int numberOfFlight;
/**
* @param date date of Flight
* @param time time of Flight
* @param maghsad the Destination of flight
* @param mabda the Departure of Flight
* @param company agency of Flight
* @param airplaneKind kind of Airplane
* @param numberOfFlight the ID of Flight
*/
public Flight (String date , String time , String maghsad , String mabda , String company , AirPlane airplaneKind , int numberOfFlight){}
/**
* @return Date date of Flight
*/
public String getDate() {
return Date;
}
/**
* @return number of flight
*/
public int getNumberOfFlight() {
return numberOfFlight;
}
/**
* @return the airplane for the Flight
*/
public AirPlane getAirplane() {
return airplane;
}
/**
* @return Departure of flight
*/
public String getMabda() {
return mabda;
}
/**
* @return Destination of flight
*/
public String getMaghsad() {
return maghsad;
}
/**
* @return time of flight
*/
public String getTime() {
return Time;
}
}
import java.util.ArrayList;
/**
* Getting the details of order
* @author Milad & Ali
* @version 1.0
*/
public class Order {
private Flight flight;
private int serialNumber;
private String status;
private ArrayList<Seat> seats ;
/**
* @param flight the flight for booking
* @param serialNumber the serialNumber of order
*/
public Order (Flight flight , int serialNumber){
this.flight = flight;
this.serialNumber = serialNumber;
seats = new ArrayList<>();
status = "pending";
}
/**
* check if the seatNum given is free in flight to book
* @param seatNum the ID of seat
*/
public void addSeat (int seatNum){
for (int i = 0; i < flight.getAirplane().getSeats().size(); i++) {
if(flight.getAirplane().getSeats().get(i).getSeatNum() == seatNum){
this.seats.add(flight.getAirplane().getSeats().get(i));
}
}
}
/**
* @return the status of order
*/
public String getStatus()
{
return status;
}
/**
* @return the seats of order
*/
public ArrayList<Seat> getSeats()
{
return seats;
}
/**
* @return the flight of order
*/
public Flight getFlight() {
return flight;
}
/**
* @return serial number of seat
*/
public int getSerialNumber() {
return serialNumber;
}
/**
* changing the status of order
*/
public void setPendingToSubmitted(){
this.status = "submitted";
}
/**
* @return the price of order
*/
public int calculateOrderPrice(){
int sum = 0;
for (int i = 0; i < seats.size(); i++) {
sum += seats.get(i).getPrice();
}
return sum;
}
}
#this is the readme of lab7
#This was written and modified by Milad Only and a little Ali
\ No newline at end of file
/**
* Getting the details of seats
* @author Milad & Ali
* @version 1.0
*/
public class Seat {
private int seatNum;
private String kind;
private String status;
private int price;
/**
* @param seatNum the serial number of seat
* @param kind the kind of seat
* @param price the price of seat
*/
public Seat (int seatNum , String kind , int price){
this.seatNum = seatNum;
this.kind = kind;
this.price = price;
this.status = "pending";
}
public String getPendingToSubmitted()
{
return status;
}
public int getSeatNum() {
return seatNum;
}
public String getKind() {
return kind;
}
public String getStatus()
{
return status;
}
public int getPrice()
{
return price;
}
/**
* Change the status to submitted
*/
public void setPendingToSubmitted()
{
this.status = "submitted";
}
}
import java.util.ArrayList;
/**
* The system for managing the Flights
*/
public class System {
ArrayList<Flight> totalFlights = new ArrayList<>();
/**
* @param flight the flight for adding to flight list
*/
public void addFlight(Flight flight){
totalFlights.add(flight);
}
/**
* @param flight check if the flight is available to remove
* @return if the flight was removed or not
*/
public boolean removeFlight(Flight flight){
if(totalFlights.contains(flight)){
totalFlights.remove(flight);
return true;
}else {
return false;
}
}
/**
* @return the list of flight
*/
public ArrayList<Flight> getTotalFlights() {
return totalFlights;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment