First push

- Zoo base
- Secteur base
- Animal base
This commit is contained in:
Tanguy Herbron 2018-11-20 16:48:23 +01:00
parent b45f7efca9
commit 7fe630196c
18 changed files with 971 additions and 0 deletions

1
ENSIM/Java/tp_poo_4a/.idea/.name generated Normal file
View File

@ -0,0 +1 @@
tp_poo_4a

14
ENSIM/Java/tp_poo_4a/.idea/compiler.xml generated Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="Java" />
<module name="tp_poo_4a" />
</profile>
</annotationProcessing>
</component>
</project>

14
ENSIM/Java/tp_poo_4a/.idea/misc.xml generated Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

124
ENSIM/Java/tp_poo_4a/.idea/uiDesigner.xml generated Normal file
View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

6
ENSIM/Java/tp_poo_4a/.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>

590
ENSIM/Java/tp_poo_4a/.idea/workspace.xml generated Normal file
View File

@ -0,0 +1,590 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="89f05324-65b4-4515-8c2e-c4b7aba89b94" name="Default Changelist" comment="" />
<ignored path="$PROJECT_DIR$/out/" />
<ignored path="$PROJECT_DIR$/target/" />
<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="-334159697">
<usages-collector id="statistics.lifecycle.project">
<counts>
<entry key="project.closed" value="1" />
<entry key="project.open.time.1" value="1" />
<entry key="project.opened" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="java" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="JAVA" value="1" />
</counts>
</usages-collector>
</session>
<session id="2052030809">
<usages-collector id="statistics.lifecycle.project">
<counts>
<entry key="project.open.time.0" value="1" />
<entry key="project.open.time.8" value="1" />
<entry key="project.opened" value="2" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="dummy" value="3" />
<entry key="java" value="1788" />
<entry key="xml" value="18" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="JAVA" value="1788" />
<entry key="PLAIN_TEXT" value="3" />
<entry key="XML" value="18" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="java" value="11" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="JAVA" value="11" />
</counts>
</usages-collector>
</session>
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/pom.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="20" column="10" selection-start-line="20" selection-start-column="10" selection-end-line="20" selection-end-column="10" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/App.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="408">
<caret line="24" column="5" lean-forward="true" selection-start-line="6" selection-start-column="4" selection-end-line="24" selection-end-column="5" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/test/java/AppTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="313">
<caret line="22" column="21" selection-start-line="22" selection-start-column="21" selection-end-line="22" selection-end-column="21" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/Zoo.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="23" column="19" selection-start-line="23" selection-start-column="19" selection-end-line="23" selection-end-column="19" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#170#171#0" expanded="true" />
<element signature="e#227#228#0" expanded="true" />
<element signature="e#384#385#0" expanded="true" />
<element signature="e#456#457#0" expanded="true" />
<element signature="e#552#553#0" expanded="true" />
<element signature="e#576#577#0" expanded="true" />
<element signature="e#801#802#0" expanded="true" />
<element signature="e#835#836#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/Chien.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
<caret line="6" column="5" selection-start-line="6" selection-start-column="5" selection-end-line="6" selection-end-column="5" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/Animal.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="10" column="21" selection-start-line="10" selection-start-column="21" selection-end-line="10" selection-end-column="21" />
<folding>
<element signature="e#126#127#0" expanded="true" />
<element signature="e#158#159#0" expanded="true" />
<element signature="e#203#204#0" expanded="true" />
<element signature="e#236#237#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/TypeAnimal.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="8" selection-start-line="2" selection-start-column="8" selection-end-line="2" selection-end-column="8" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/Secteur.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="466">
<caret line="29" column="39" selection-start-line="29" selection-start-column="39" selection-end-line="29" selection-end-column="39" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#432#433#0" expanded="true" />
<element signature="e#465#466#0" expanded="true" />
<element signature="e#397#398#0" expanded="true" />
<element signature="e#445#446#0" expanded="true" />
<element signature="e#488#489#0" expanded="true" />
<element signature="e#534#535#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/exception/LimiteVisiteurException.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="13" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/exception/AnimauxDansMauvaisSecteurException.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="13" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Enum" />
<option value="Class" />
<option value="JUnit4 Test Class" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../.." />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/main/java/TypeAnimal.java" />
<option value="$PROJECT_DIR$/src/main/java/Animal.java" />
<option value="$PROJECT_DIR$/src/main/java/Espece/Chient.java" />
<option value="$PROJECT_DIR$/src/main/java/Espece/Chien.java" />
<option value="$PROJECT_DIR$/src/main/java/Espece/Animal.java" />
<option value="$PROJECT_DIR$/src/main/java/Espece/Chat.java" />
<option value="$PROJECT_DIR$/src/main/java/Chat.java" />
<option value="$PROJECT_DIR$/src/main/java/Chien.java" />
<option value="$PROJECT_DIR$/src/main/java/LimiteVisiteurException.java" />
<option value="$PROJECT_DIR$/src/main/java/AnimauxDansMauvaisSecteurException.java" />
<option value="$PROJECT_DIR$/src/main/java/Secteur.java" />
<option value="$PROJECT_DIR$/src/main/java/Zoo.java" />
<option value="$PROJECT_DIR$/src/main/java/App.java" />
<option value="$PROJECT_DIR$/pom.xml" />
<option value="$PROJECT_DIR$/src/test/java/AppTest.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-12" />
<option name="y" value="-12" />
<option name="width" value="2800" />
<option name="height" value="1760" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
<ConfirmationsSetting value="2" id="Add" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="tp_poo_4a" type="b2602c69:ProjectViewProjectNode" />
<item name="tp_poo_4a" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="tp_poo_4a" type="b2602c69:ProjectViewProjectNode" />
<item name="tp_poo_4a" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="tp_poo_4a" type="b2602c69:ProjectViewProjectNode" />
<item name="tp_poo_4a" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="tp_poo_4a" type="b2602c69:ProjectViewProjectNode" />
<item name="tp_poo_4a" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="tp_poo_4a" type="b2602c69:ProjectViewProjectNode" />
<item name="tp_poo_4a" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="test" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="tp_poo_4a" type="b2602c69:ProjectViewProjectNode" />
<item name="tp_poo_4a" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="test" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="AndroidView" />
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542720876270" />
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit4" value="" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="project.structure.last.edited" value="Modules" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.0" />
<property name="settings.editor.selected.configurable" value="project.propVCSSupport.Mappings" />
</component>
<component name="RecentsManager">
<key name="CreateTestDialog.RecentsKey">
<recent name="" />
</key>
<key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
<recent name="" />
</key>
<key name="CreateTestDialog.Recents.Supers">
<recent name="" />
</key>
<key name="CreateClassDialog.RecentsKey">
<recent name="Espece" />
<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="Application.AppTest">
<configuration name="App" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="App" />
<module name="tp_poo_4a" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="AppTest" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="AppTest" />
<module name="tp_poo_4a" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="Application.App" />
<item itemvalue="Application.AppTest" />
</list>
<recent_temporary>
<list>
<item itemvalue="Application.AppTest" />
<item itemvalue="Application.App" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="89f05324-65b4-4515-8c2e-c4b7aba89b94" name="Default Changelist" comment="" />
<created>1542706982943</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1542706982943</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="-6" y="-6" width="1513" height="973" extended-state="6" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2563574" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Image Layers" order="2" />
<window_info id="Designer" order="3" />
<window_info id="UI Designer" order="4" />
<window_info id="Capture Tool" order="5" />
<window_info id="Favorites" order="6" side_tool="true" />
<window_info anchor="bottom" id="Messages" weight="0.32897863" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.32897863" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Terminal" order="7" />
<window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
<window_info anchor="bottom" id="Version Control" order="9" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="right" id="Palette" order="3" />
<window_info anchor="right" id="Capture Analysis" order="4" />
<window_info anchor="right" id="Theme Preview" order="5" />
<window_info anchor="right" id="Palette&#9;" order="6" />
<window_info anchor="right" id="Maven Projects" order="7" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<ignored-roots>
<path value="$PROJECT_DIR$/../.." />
</ignored-roots>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/main/java/Espece/Animal.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/Chat.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="4" selection-start-line="2" selection-start-column="4" selection-end-line="6" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/Animal.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="10" column="21" selection-start-line="10" selection-start-column="21" selection-end-line="10" selection-end-column="21" />
<folding>
<element signature="e#126#127#0" expanded="true" />
<element signature="e#158#159#0" expanded="true" />
<element signature="e#203#204#0" expanded="true" />
<element signature="e#236#237#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/TypeAnimal.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="8" selection-start-line="2" selection-start-column="8" selection-end-line="2" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/exception/AnimauxDansMauvaisSecteurException.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="13" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/exception/LimiteVisiteurException.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="13" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/Chien.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
<caret line="6" column="5" selection-start-line="6" selection-start-column="5" selection-end-line="6" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/Secteur.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="466">
<caret line="29" column="39" selection-start-line="29" selection-start-column="39" selection-end-line="29" selection-end-column="39" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#432#433#0" expanded="true" />
<element signature="e#465#466#0" expanded="true" />
<element signature="e#397#398#0" expanded="true" />
<element signature="e#445#446#0" expanded="true" />
<element signature="e#488#489#0" expanded="true" />
<element signature="e#534#535#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/Zoo.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="23" column="19" selection-start-line="23" selection-start-column="19" selection-end-line="23" selection-end-column="19" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#170#171#0" expanded="true" />
<element signature="e#227#228#0" expanded="true" />
<element signature="e#384#385#0" expanded="true" />
<element signature="e#456#457#0" expanded="true" />
<element signature="e#552#553#0" expanded="true" />
<element signature="e#576#577#0" expanded="true" />
<element signature="e#801#802#0" expanded="true" />
<element signature="e#835#836#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pom.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="20" column="10" selection-start-line="20" selection-start-column="10" selection-end-line="20" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/App.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="408">
<caret line="24" column="5" lean-forward="true" selection-start-line="6" selection-start-column="4" selection-end-line="24" selection-end-column="5" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/java/AppTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="313">
<caret line="22" column="21" selection-start-line="22" selection-start-column="21" selection-end-line="22" selection-end-column="21" />
<folding>
<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>tp_poo_4a</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>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4" />

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.ensim.tp_poo_4a</groupId>
<artifactId>tp_poo_4a</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId >
<artifactId>junit</artifactId >
<version>4.12</version >
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,15 @@
public class Animal {
private String nomAnimal;
private TypeAnimal typeAnimal;
public String getNomAnimal()
{
return nomAnimal;
}
public TypeAnimal getTypeAnimal()
{
return typeAnimal;
}
}

View File

@ -0,0 +1,26 @@
import exception.LimiteVisiteurException;
import java.util.Arrays;
public class App {
public static void main(String[] args)
{
Zoo zoo = new Zoo();
Chien chien = new Chien();
zoo.nouvelAnimal(chien);
for(int i = 0; i < 20; i++)
{
try {
zoo.nouveauVisiteur();
} catch (LimiteVisiteurException e) {
System.out.println("Trop de visiteurs " + Arrays.toString(e.getStackTrace()));
} finally {
System.out.println(">> " + zoo.getNombreVisiteur() + "/" + zoo.getLimiteVisiteur());
}
}
}
}

View File

@ -0,0 +1,9 @@
public class Chat extends Animal {
@Override
public String getNomAnimal()
{
return super.getNomAnimal();
}
}

View File

@ -0,0 +1,8 @@
public class Chien extends Animal {
@Override
public String getNomAnimal()
{
return super.getNomAnimal();
}
}

View File

@ -0,0 +1,32 @@
import java.util.ArrayList;
import java.util.List;
public class Secteur {
final public static int NB_MAX_VISITEURS = 15;
private TypeAnimal typeAnimauxDansSecteurs;
private List<Animal> animauxDansSecteur;
public Secteur(TypeAnimal typeAnimal)
{
this.typeAnimauxDansSecteurs = typeAnimal;
animauxDansSecteur = new ArrayList<Animal>();
}
public void ajouterAnimal(Animal animal)
{
animauxDansSecteur.add(animal);
}
public int getNombreAnimaux()
{
return animauxDansSecteur.size();
}
public TypeAnimal obtenirType()
{
return typeAnimauxDansSecteurs;
}
}

View File

@ -0,0 +1,5 @@
public enum TypeAnimal {
Chien,
Chat
}

View File

@ -0,0 +1,67 @@
import exception.LimiteVisiteurException;
import java.util.ArrayList;
import java.util.List;
public class Zoo {
private int nbVisiteurs;
private List<Secteur> secteursAnimaux;
public Zoo()
{
secteursAnimaux = new ArrayList<Secteur>();
}
public void nouveauVisiteur() throws LimiteVisiteurException
{
if(nbVisiteurs >= getLimiteVisiteur())
{
throw new LimiteVisiteurException();
}
else
{
nbVisiteurs++;
}
}
public int getLimiteVisiteur()
{
return secteursAnimaux.size() * Secteur.NB_MAX_VISITEURS;
}
public void nouvelAnimal(Animal animal)
{
int index = 0;
boolean found = false;
while(index < secteursAnimaux.size() && !found)
{
index++;
if(secteursAnimaux.get(index).obtenirType().equals(animal.getTypeAnimal()))
{
found = true;
secteursAnimaux.get(index).ajouterAnimal(animal);
}
}
if(secteursAnimaux.size() == 0 || !found)
{
Secteur secteur = new Secteur(animal.getTypeAnimal());
secteur.ajouterAnimal(animal);
secteursAnimaux.add(secteur);
}
}
public int nombreAnimaux()
{
return 0;
}
public int getNombreVisiteur()
{
return nbVisiteurs;
}
}

View File

@ -0,0 +1,4 @@
package exception;
public class AnimauxDansMauvaisSecteurException extends Exception {
}

View File

@ -0,0 +1,4 @@
package exception;
public class LimiteVisiteurException extends Exception {
}

View File

@ -0,0 +1,29 @@
import exception.LimiteVisiteurException;
import java.util.Arrays;
import static org.junit.Assert.*;
public class AppTest {
public static void main(String[] args)
{
Zoo zoo = new Zoo();
Chien chien = new Chien();
zoo.nouvelAnimal(chien);
for(int i = 0; i < 20; i++)
{
try {
zoo.nouveauVisiteur();
} catch (LimiteVisiteurException e) {
System.out.println("Trop de visiteurs " + Arrays.toString(e.getStackTrace()));
} finally {
System.out.println(">> " + zoo.getNombreVisiteur() + "/" + zoo.getLimiteVisiteur());
}
}
}
}