Merge branch 'master' of https://codefirst.iut.uca.fr/git/antoine.perederii/IUT
commit
463c89bd60
Binary file not shown.
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>53.0</x>
|
||||
<y>123.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>159.0</x>
|
||||
<y>123.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>269.0</x>
|
||||
<y>124.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>0</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>0</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>69.0</x>
|
||||
<y>109.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>193.0</x>
|
||||
<y>109.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>320.0</x>
|
||||
<y>109.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>0</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>0</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>48.0</x>
|
||||
<y>79.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>151.0</x>
|
||||
<y>80.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>258.0</x>
|
||||
<y>88.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>a,b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a,b</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>67.0</x>
|
||||
<y>146.0</y>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>209.0</x>
|
||||
<y>50.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>213.0</x>
|
||||
<y>144.0</y>
|
||||
</state>
|
||||
<state id="3" name="q3">
|
||||
<x>207.0</x>
|
||||
<y>250.0</y>
|
||||
</state>
|
||||
<state id="4" name="q4">
|
||||
<x>344.0</x>
|
||||
<y>56.0</y>
|
||||
</state>
|
||||
<state id="5" name="q5">
|
||||
<x>345.0</x>
|
||||
<y>134.0</y>
|
||||
</state>
|
||||
<state id="6" name="q6">
|
||||
<x>345.0</x>
|
||||
<y>238.0</y>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>3</from>
|
||||
<to>3</to>
|
||||
<read>c</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>3</from>
|
||||
<to>6</to>
|
||||
<read>a,b,c</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>6</from>
|
||||
<to>3</to>
|
||||
<read>c</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>5</to>
|
||||
<read>a,b,c</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>5</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>3</to>
|
||||
<read>c</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>6</from>
|
||||
<to>6</to>
|
||||
<read>a,b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>4</from>
|
||||
<to>4</to>
|
||||
<read>b,c</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>5</from>
|
||||
<to>5</to>
|
||||
<read>a,c</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>4</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>4</to>
|
||||
<read>a,b,c</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>78.0</x>
|
||||
<y>159.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>209.0</x>
|
||||
<y>161.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>339.0</x>
|
||||
<y>161.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>0</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>1</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>72.0</x>
|
||||
<y>117.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>188.0</x>
|
||||
<y>120.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>305.0</x>
|
||||
<y>122.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>a,b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>0</to>
|
||||
<read>,b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>95.0</x>
|
||||
<y>119.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>215.0</x>
|
||||
<y>120.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>1</to>
|
||||
<read>a,b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>59.0</x>
|
||||
<y>133.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>130.0</x>
|
||||
<y>136.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>206.0</x>
|
||||
<y>136.0</y>
|
||||
</state>
|
||||
<state id="3" name="q3">
|
||||
<x>283.0</x>
|
||||
<y>139.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>0</to>
|
||||
<read>a,b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>3</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>154.0</x>
|
||||
<y>143.0</y>
|
||||
<initial/>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>0</to>
|
||||
<read>a,b</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>48.0</x>
|
||||
<y>113.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>126.0</x>
|
||||
<y>118.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>206.0</x>
|
||||
<y>117.0</y>
|
||||
</state>
|
||||
<state id="3" name="q3">
|
||||
<x>279.0</x>
|
||||
<y>117.0</y>
|
||||
</state>
|
||||
<state id="4" name="q4">
|
||||
<x>343.0</x>
|
||||
<y>121.0</y>
|
||||
</state>
|
||||
<state id="5" name="q5">
|
||||
<x>473.0</x>
|
||||
<y>108.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>0</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>5</from>
|
||||
<to>5</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>0</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>5</from>
|
||||
<to>5</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>3</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>3</from>
|
||||
<to>4</to>
|
||||
<read>c</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>4</from>
|
||||
<to>5</to>
|
||||
<read>c</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>47.0</x>
|
||||
<y>87.0</y>
|
||||
<initial/>
|
||||
<final/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>133.0</x>
|
||||
<y>155.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>230.0</x>
|
||||
<y>89.0</y>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a,b,c</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>a,b,c</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>0</to>
|
||||
<read>a,b,c</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>63.0</x>
|
||||
<y>106.0</y>
|
||||
<initial/>
|
||||
<final/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>208.0</x>
|
||||
<y>64.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>360.0</x>
|
||||
<y>117.0</y>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>0</to>
|
||||
<read>c</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>131.0</x>
|
||||
<y>178.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>214.0</x>
|
||||
<y>177.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>275.0</x>
|
||||
<y>105.0</y>
|
||||
</state>
|
||||
<state id="3" name="q3">
|
||||
<x>232.0</x>
|
||||
<y>37.0</y>
|
||||
</state>
|
||||
<state id="4" name="q4">
|
||||
<x>142.0</x>
|
||||
<y>34.0</y>
|
||||
</state>
|
||||
<state id="5" name="q5">
|
||||
<x>83.0</x>
|
||||
<y>97.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>3</from>
|
||||
<to>4</to>
|
||||
<read>l</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>4</from>
|
||||
<to>5</to>
|
||||
<read>o</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>e</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>h</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>3</to>
|
||||
<read>l</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>141.0</x>
|
||||
<y>253.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>279.0</x>
|
||||
<y>154.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>269.0</x>
|
||||
<y>354.0</y>
|
||||
</state>
|
||||
<state id="3" name="q3">
|
||||
<x>386.0</x>
|
||||
<y>261.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>1</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>3</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>3</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>141.0</x>
|
||||
<y>253.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>279.0</x>
|
||||
<y>154.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>269.0</x>
|
||||
<y>354.0</y>
|
||||
</state>
|
||||
<state id="3" name="q3">
|
||||
<x>386.0</x>
|
||||
<y>261.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>1</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>3</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>3</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>65.0</x>
|
||||
<y>469.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>175.0</x>
|
||||
<y>553.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>175.0</x>
|
||||
<y>405.0</y>
|
||||
</state>
|
||||
<state id="3" name="q3">
|
||||
<x>386.0</x>
|
||||
<y>565.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<state id="4" name="q4">
|
||||
<x>382.0</x>
|
||||
<y>400.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>4</from>
|
||||
<to>4</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>3</from>
|
||||
<to>3</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>3</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>3</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>4</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>4</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>65.0</x>
|
||||
<y>469.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>175.0</x>
|
||||
<y>553.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>175.0</x>
|
||||
<y>405.0</y>
|
||||
</state>
|
||||
<state id="3" name="q3">
|
||||
<x>386.0</x>
|
||||
<y>565.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<state id="4" name="q4">
|
||||
<x>382.0</x>
|
||||
<y>400.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>4</from>
|
||||
<to>4</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>3</from>
|
||||
<to>3</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>3</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>3</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>4</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>4</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>97.0</x>
|
||||
<y>431.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>358.0</x>
|
||||
<y>438.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>240.0</x>
|
||||
<y>350.0</y>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>aa</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>1</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>0</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>97.0</x>
|
||||
<y>431.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>358.0</x>
|
||||
<y>438.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>240.0</x>
|
||||
<y>350.0</y>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>aa</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>1</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>0</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>187.0</x>
|
||||
<y>303.0</y>
|
||||
<initial/>
|
||||
<final/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>318.0</x>
|
||||
<y>245.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>455.0</x>
|
||||
<y>306.0</y>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>0</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>187.0</x>
|
||||
<y>303.0</y>
|
||||
<initial/>
|
||||
<final/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>318.0</x>
|
||||
<y>245.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>455.0</x>
|
||||
<y>306.0</y>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>0</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>143.0</x>
|
||||
<y>187.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>371.0</x>
|
||||
<y>184.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>141.0</x>
|
||||
<y>392.0</y>
|
||||
</state>
|
||||
<state id="3" name="q3">
|
||||
<x>399.0</x>
|
||||
<y>398.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>3</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>0</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>3</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>3</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>143.0</x>
|
||||
<y>187.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>371.0</x>
|
||||
<y>184.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>141.0</x>
|
||||
<y>392.0</y>
|
||||
</state>
|
||||
<state id="3" name="q3">
|
||||
<x>399.0</x>
|
||||
<y>398.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>3</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>0</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>3</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>3</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 6.4.--><structure>
|
||||
<type>fa</type>
|
||||
<automaton>
|
||||
<!--The list of states.-->
|
||||
<state id="0" name="q0">
|
||||
<x>21.0</x>
|
||||
<y>259.0</y>
|
||||
<initial/>
|
||||
</state>
|
||||
<state id="1" name="q1">
|
||||
<x>184.0</x>
|
||||
<y>117.0</y>
|
||||
</state>
|
||||
<state id="2" name="q2">
|
||||
<x>179.0</x>
|
||||
<y>357.0</y>
|
||||
</state>
|
||||
<state id="3" name="q3">
|
||||
<x>342.0</x>
|
||||
<y>249.0</y>
|
||||
<final/>
|
||||
</state>
|
||||
<!--The list of transitions.-->
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>0</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>1</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>0</from>
|
||||
<to>0</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>1</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>2</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>1</from>
|
||||
<to>3</to>
|
||||
<read>a</read>
|
||||
</transition>
|
||||
<transition>
|
||||
<from>2</from>
|
||||
<to>3</to>
|
||||
<read>b</read>
|
||||
</transition>
|
||||
</automaton>
|
||||
</structure>
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
/.metadata/
|
@ -1,11 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-18">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
@ -0,0 +1 @@
|
||||
/bin/
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>testQualiteDev</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,14 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=18
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=18
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=18
|
@ -0,0 +1,38 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class ChargeurTelecommande {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Telecommande remoteControl = new Telecommande();
|
||||
|
||||
Lampe lampe = new Lampe("Séjour");
|
||||
TV tv = new TV("Séjour");
|
||||
Stereo stereo = new Stereo("Séjour");
|
||||
Jacuzzi jacuzzi = new Jacuzzi();
|
||||
|
||||
CommandeAllumerLampe lampeAllumee = new CommandeAllumerLampe(lampe);
|
||||
CommandeAllumerStereo stereoAllumee = new CommandeAllumerStereo(stereo);
|
||||
CommandeAllumerTV tvAllumee = new CommandeAllumerTV(tv);
|
||||
CommandeAllumerJacuzzi jacuzziAllume = new CommandeAllumerJacuzzi(jacuzzi);
|
||||
CommandeEteindreLampe lampeEteinte = new CommandeEteindreLampe(lampe);
|
||||
CommandeEteindreStereo stereoEteinte = new CommandeEteindreStereo(stereo);
|
||||
CommandeEteindreTV tvEteinte = new CommandeEteindreTV(tv);
|
||||
CommandeEteindreJacuzzi jacuzziEteint = new CommandeEteindreJacuzzi(jacuzzi);
|
||||
|
||||
Commande[] allumageGroupe = { lampeAllumee, stereoAllumee, tvAllumee, jacuzziAllume};
|
||||
Commande[] extinctionGroupe = { lampeEteinte, stereoEteinte, tvEteinte, jacuzziEteint};
|
||||
|
||||
MacroCommande macroAllumageGroupe = new MacroCommande(allumageGroupe);
|
||||
MacroCommande macroExtinctionGroupe = new MacroCommande(extinctionGroupe);
|
||||
|
||||
remoteControl.setCommande(0, macroAllumageGroupe, macroExtinctionGroupe);
|
||||
|
||||
System.out.println(remoteControl);
|
||||
System.out.println("---Exécution de Macro Marche ---");
|
||||
remoteControl.boutonMarchePresse(0);
|
||||
System.out.println("--- Exécution de Macro Arret ---");
|
||||
remoteControl.boutonArretPresse(0);
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public interface Commande {
|
||||
public void executer();
|
||||
public void annuler();
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeAllumerJacuzzi implements Commande {
|
||||
Jacuzzi jacuzzi;
|
||||
|
||||
public CommandeAllumerJacuzzi(Jacuzzi jacuzzi) {
|
||||
this.jacuzzi = jacuzzi;
|
||||
}
|
||||
public void executer() {
|
||||
jacuzzi.allumer();
|
||||
jacuzzi.setTemperature(40);
|
||||
jacuzzi.bouillonner();
|
||||
}
|
||||
public void annuler() {
|
||||
jacuzzi.eteindre();
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeAllumerLampe implements Commande {
|
||||
Lampe lampe;
|
||||
|
||||
public CommandeAllumerLampe(Lampe lampe) {
|
||||
this.lampe = lampe;
|
||||
}
|
||||
|
||||
public void executer() {
|
||||
lampe.marche();
|
||||
}
|
||||
|
||||
public void annuler() {
|
||||
lampe.arret();
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeAllumerLampeSejour implements Commande {
|
||||
Lampe lampe;
|
||||
|
||||
public CommandeAllumerLampeSejour(Lampe lampe) {
|
||||
this.lampe = lampe;
|
||||
}
|
||||
public void executer() {
|
||||
lampe.arret();
|
||||
}
|
||||
public void annuler() {
|
||||
lampe.marche();
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeAllumerStereo implements Commande {
|
||||
Stereo stereo;
|
||||
|
||||
public CommandeAllumerStereo(Stereo stereo) {
|
||||
this.stereo = stereo;
|
||||
}
|
||||
|
||||
public void executer() {
|
||||
stereo.marche();
|
||||
}
|
||||
|
||||
public void annuler() {
|
||||
stereo.arret();
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeAllumerStereoAvecCD implements Commande {
|
||||
Stereo stereo;
|
||||
|
||||
public CommandeAllumerStereoAvecCD(Stereo stereo) {
|
||||
this.stereo = stereo;
|
||||
}
|
||||
|
||||
public void executer() {
|
||||
stereo.marche();
|
||||
stereo.setCD();
|
||||
stereo.setVolume(11);
|
||||
}
|
||||
|
||||
public void annuler() {
|
||||
stereo.arret();
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeAllumerTV implements Commande {
|
||||
TV tv;
|
||||
|
||||
public CommandeAllumerTV(TV tv) {
|
||||
this.tv= tv;
|
||||
}
|
||||
|
||||
public void executer() {
|
||||
tv.marche();
|
||||
tv.selectionnerCanal();
|
||||
}
|
||||
|
||||
public void annuler() {
|
||||
tv.arret();
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeEteindreJacuzzi implements Commande {
|
||||
Jacuzzi jacuzzi;
|
||||
|
||||
public CommandeEteindreJacuzzi(Jacuzzi jacuzzi) {
|
||||
this.jacuzzi = jacuzzi;
|
||||
}
|
||||
|
||||
public void executer() {
|
||||
jacuzzi.setTemperature(36);
|
||||
jacuzzi.eteindre();
|
||||
}
|
||||
public void annuler() {
|
||||
jacuzzi.allumer();
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeEteindreLampe implements Commande {
|
||||
Lampe lampe;
|
||||
|
||||
public CommandeEteindreLampe(Lampe lampe) {
|
||||
this.lampe = lampe;
|
||||
}
|
||||
|
||||
public void executer() {
|
||||
lampe.arret();
|
||||
}
|
||||
|
||||
public void annuler() {
|
||||
lampe.marche();
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeEteindreLampeSejour implements Commande {
|
||||
Lampe lampe;
|
||||
|
||||
public CommandeEteindreLampeSejour(Lampe lampe) {
|
||||
this.lampe = lampe;
|
||||
}
|
||||
public void executer() {
|
||||
lampe.marche();
|
||||
}
|
||||
public void annuler() {
|
||||
lampe.arret();
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeEteindreStereo implements Commande {
|
||||
Stereo stereo;
|
||||
|
||||
public CommandeEteindreStereo(Stereo stereo) {
|
||||
this.stereo = stereo;
|
||||
}
|
||||
|
||||
public void executer() {
|
||||
stereo.arret();
|
||||
}
|
||||
|
||||
public void annuler() {
|
||||
stereo.marche();
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeEteindreTV implements Commande {
|
||||
TV tv;
|
||||
|
||||
public CommandeEteindreTV(TV tv) {
|
||||
this.tv= tv;
|
||||
}
|
||||
|
||||
public void executer() {
|
||||
tv.arret();
|
||||
}
|
||||
|
||||
public void annuler() {
|
||||
tv.marche();
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeEteindreVentilateur implements Commande {
|
||||
Ventilateur ventilateur;
|
||||
int derniereVitesse;
|
||||
|
||||
public CommandeEteindreVentilateur(Ventilateur ventilateur) {
|
||||
this.ventilateur = ventilateur;
|
||||
}
|
||||
public void executer() {
|
||||
derniereVitesse = ventilateur.getVitesse();
|
||||
ventilateur.arreter();
|
||||
}
|
||||
public void annuler() {
|
||||
switch (derniereVitesse) {
|
||||
case Ventilateur.RAPIDE: ventilateur.rapide(); break;
|
||||
case Ventilateur.MOYEN: ventilateur.moyen(); break;
|
||||
case Ventilateur.LENT: ventilateur.lent(); break;
|
||||
default: ventilateur.arreter(); break;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeVentilateurMoyen implements Commande {
|
||||
Ventilateur ventilateur;
|
||||
int derniereVitesse;
|
||||
|
||||
public CommandeVentilateurMoyen(Ventilateur ventilateur) {
|
||||
this.ventilateur = ventilateur;
|
||||
}
|
||||
public void executer() {
|
||||
derniereVitesse = ventilateur.getVitesse();
|
||||
ventilateur.moyen();
|
||||
}
|
||||
public void annuler() {
|
||||
switch (derniereVitesse) {
|
||||
case Ventilateur.RAPIDE: ventilateur.rapide(); break;
|
||||
case Ventilateur.MOYEN: ventilateur.moyen(); break;
|
||||
case Ventilateur.LENT: ventilateur.lent(); break;
|
||||
default: ventilateur.arreter(); break;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class CommandeVentilateurRapide implements Commande {
|
||||
Ventilateur ventilateur;
|
||||
int derniereVitesse;
|
||||
|
||||
public CommandeVentilateurRapide(Ventilateur ventilateur) {
|
||||
this.ventilateur = ventilateur;
|
||||
}
|
||||
public void executer() {
|
||||
derniereVitesse = ventilateur.getVitesse();
|
||||
ventilateur.rapide();
|
||||
}
|
||||
public void annuler() {
|
||||
switch (derniereVitesse) {
|
||||
case Ventilateur.RAPIDE: ventilateur.rapide(); break;
|
||||
case Ventilateur.MOYEN: ventilateur.moyen(); break;
|
||||
case Ventilateur.LENT: ventilateur.lent(); break;
|
||||
default: ventilateur.arreter(); break;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class Jacuzzi {
|
||||
boolean allume;
|
||||
int temperature;
|
||||
|
||||
public Jacuzzi() {
|
||||
}
|
||||
|
||||
public void allumer() {
|
||||
allume = true;
|
||||
}
|
||||
|
||||
public void eteindre() {
|
||||
allume = false;
|
||||
}
|
||||
|
||||
public void bouillonner() {
|
||||
if (allume) {
|
||||
System.out.println("Le jaccuzi bouillonne !");
|
||||
}
|
||||
}
|
||||
|
||||
public void marche() {
|
||||
if (allume) {
|
||||
System.out.println("Le jaccuzi est en marche");
|
||||
}
|
||||
}
|
||||
|
||||
public void arret() {
|
||||
if (allume) {
|
||||
System.out.println("Le jaccuzi est arrêté");
|
||||
}
|
||||
}
|
||||
|
||||
public void setTemperature(int temperature) {
|
||||
if (temperature > this.temperature) {
|
||||
System.out.println("Le jacuzzi chauffe à " + temperature + "°");
|
||||
}
|
||||
else {
|
||||
System.out.println("Le jaccuzi refroidit à " + temperature + "°");
|
||||
}
|
||||
this.temperature = temperature;
|
||||
}
|
||||
|
||||
public boolean getAllume() {
|
||||
return this.allume;
|
||||
}
|
||||
|
||||
public int getTemperature() {
|
||||
return this.temperature;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class Lampe {
|
||||
String localisation;
|
||||
int niveau;
|
||||
|
||||
public Lampe(String localisation) {
|
||||
this.localisation = localisation;
|
||||
}
|
||||
|
||||
public void marche() {
|
||||
niveau = 100;
|
||||
System.out.println(this.localisation+": lumière allumée");
|
||||
}
|
||||
|
||||
public void arret() {
|
||||
niveau = 0;
|
||||
System.out.println(localisation+": lumière éteinte");
|
||||
}
|
||||
|
||||
public void attenuer(int niveau) {
|
||||
this.niveau = niveau;
|
||||
if (niveau == 0) {
|
||||
arret();
|
||||
}
|
||||
else {
|
||||
System.out.println("Le niveau de la lampe est positionné sur " + niveau + "%");
|
||||
}
|
||||
}
|
||||
|
||||
public int getNiveau() {
|
||||
return niveau;
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class MacroCommande implements Commande {
|
||||
Commande[] commandes;
|
||||
|
||||
public MacroCommande(Commande[] commandes) {
|
||||
this.commandes = commandes;
|
||||
}
|
||||
|
||||
public void executer() {
|
||||
for (int i = 0; i < commandes.length; i++) {
|
||||
commandes[i].executer();
|
||||
}
|
||||
}
|
||||
|
||||
public void annuler() {
|
||||
for (int i = 0; i < commandes.length; i++) {
|
||||
commandes[i].annuler();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class PasDeCommande implements Commande {
|
||||
public void executer() { }
|
||||
public void annuler() { }
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class Stereo {
|
||||
String localisation;
|
||||
|
||||
public Stereo(String location) {
|
||||
this.localisation = location;
|
||||
}
|
||||
|
||||
public void marche() {
|
||||
System.out.println(localisation + ": stéréo allumée");
|
||||
}
|
||||
|
||||
public void arret() {
|
||||
System.out.println(localisation + ": stéréo éteinte");
|
||||
}
|
||||
|
||||
public void setCD() {
|
||||
System.out.println(localisation + ": stéréo réglée pour l'entrée CD");
|
||||
}
|
||||
|
||||
public void setDVD() {
|
||||
System.out.println(localisation + ": stéréo réglée pour l'entrée DVD");
|
||||
}
|
||||
|
||||
public void setRadio() {
|
||||
System.out.println(localisation + ": stéréo réglée pour la radio");
|
||||
}
|
||||
|
||||
public void setVolume(int volume) {
|
||||
// code pour positionner le volume
|
||||
// plage valide: 1-11 (aprs tout, 11 c'est mieux que 10, non ?)
|
||||
System.out.println(localisation + ": le volume stéréo est " + volume);
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return this.localisation;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class TV {
|
||||
String localisation;
|
||||
int canal;
|
||||
|
||||
public TV(String location) {
|
||||
this.localisation = location;
|
||||
}
|
||||
|
||||
public void marche() {
|
||||
System.out.println(localisation + ": la télé est allumée");
|
||||
}
|
||||
|
||||
public void arret() {
|
||||
System.out.println(localisation + ": la télé est éteinte");
|
||||
}
|
||||
|
||||
public void selectionnerCanal() {
|
||||
this.canal = 3;
|
||||
System.out.println(localisation + ": le canal est positionné sur VCR");
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return this.localisation;
|
||||
}
|
||||
|
||||
public int getCanal() {
|
||||
return this.canal;
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
//
|
||||
// Voici l'invocateur
|
||||
//
|
||||
public class Telecommande {
|
||||
Commande[] commandesMarche;
|
||||
Commande[] commandesArret;
|
||||
public Commande commandeAnnulation;
|
||||
|
||||
public Telecommande() {
|
||||
commandesMarche = new Commande[7];
|
||||
commandesArret = new Commande[7];
|
||||
|
||||
Commande pasDeCommande = new PasDeCommande();
|
||||
for(int i=0;i<7;i++) {
|
||||
commandesMarche[i] = pasDeCommande;
|
||||
commandesArret[i] = pasDeCommande;
|
||||
}
|
||||
commandeAnnulation = pasDeCommande;
|
||||
}
|
||||
|
||||
public void setCommande(int empt, Commande comMarche, Commande comArret) {
|
||||
commandesMarche[empt] = comMarche;
|
||||
commandesArret[empt] = comArret;
|
||||
}
|
||||
|
||||
public void boutonMarchePresse(int empt) {
|
||||
commandesMarche[empt].executer();
|
||||
commandeAnnulation = commandesMarche[empt];
|
||||
}
|
||||
|
||||
public void boutonArretPresse(int empt) {
|
||||
commandesArret[empt].executer();
|
||||
commandeAnnulation = commandesArret[empt];
|
||||
}
|
||||
|
||||
public void boutonAnnulPresse() {
|
||||
commandeAnnulation.annuler();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuffer stringBuff = new StringBuffer();
|
||||
stringBuff.append("\n------ Télécommande -------\n");
|
||||
for (int i = 0; i < commandesMarche.length; i++) {
|
||||
stringBuff.append("[empt " + i + "] " + commandesMarche[i].getClass().getName()
|
||||
+ " " + commandesArret[i].getClass().getName() + "\n");
|
||||
}
|
||||
stringBuff.append("[annulation] " + commandeAnnulation.getClass().getName() + "\n");
|
||||
return stringBuff.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package model;
|
||||
// package tetepremiere.commande.groupe;
|
||||
|
||||
public class Ventilateur {
|
||||
public static final int RAPIDE = 3;
|
||||
public static final int MOYEN = 2;
|
||||
public static final int LENT = 1;
|
||||
public static final int ARRET = 0;
|
||||
String localisation;
|
||||
int vitesse;
|
||||
|
||||
public Ventilateur(String localisation) {
|
||||
this.localisation = localisation;
|
||||
}
|
||||
|
||||
public void rapide() {
|
||||
// regler le ventilateur sur rapide
|
||||
vitesse = RAPIDE;
|
||||
System.out.println(localisation + ": ventilateur sur rapide");
|
||||
}
|
||||
|
||||
public void moyen() {
|
||||
// regler le ventilateur sur moyen
|
||||
vitesse = MOYEN;
|
||||
System.out.println(localisation + ": ventilateur sur moyen");
|
||||
}
|
||||
|
||||
public void lent() {
|
||||
// regler le ventilateur sur lent
|
||||
vitesse = LENT;
|
||||
System.out.println(localisation + ": ventilateur sur lent");
|
||||
}
|
||||
|
||||
public void arreter() {
|
||||
// arrete le ventilateur
|
||||
vitesse = 0;
|
||||
System.out.println(localisation + ": ventilateur arrêté");
|
||||
}
|
||||
|
||||
public int getVitesse() {
|
||||
return vitesse;
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package test;
|
||||
|
||||
import model.Jacuzzi;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class JacuzziTest {
|
||||
|
||||
@Test
|
||||
public void testAllumer() {
|
||||
Jacuzzi jacuzzi = new Jacuzzi();
|
||||
|
||||
jacuzzi.allumer();
|
||||
|
||||
Assert.assertTrue(jacuzzi.getAllume());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEteindre() {
|
||||
Jacuzzi jacuzzi = new Jacuzzi();
|
||||
jacuzzi.eteindre();
|
||||
|
||||
Assert.assertFalse(jacuzzi.getAllume());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetTemperature() {
|
||||
Jacuzzi jacuzzi = new Jacuzzi();
|
||||
|
||||
jacuzzi.setTemperature(40);
|
||||
|
||||
Assert.assertEquals(40, jacuzzi.getTemperature());
|
||||
Assert.assertNotEquals(50, jacuzzi.getTemperature());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetTemperatureNegative() {
|
||||
Jacuzzi jacuzzi = new Jacuzzi();
|
||||
|
||||
jacuzzi.setTemperature(-10);
|
||||
|
||||
Assert.assertEquals(-10, jacuzzi.getTemperature());
|
||||
Assert.assertNotEquals(0, jacuzzi.getTemperature());
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package test;
|
||||
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
import model.Lampe;
|
||||
|
||||
public class LampeTest {
|
||||
|
||||
@Test
|
||||
public void testMarche() {
|
||||
Lampe lampe = new Lampe("Salon");
|
||||
lampe.marche();
|
||||
assertEquals(100, lampe.getNiveau());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testArret() {
|
||||
Lampe lampe = new Lampe("Chambre");
|
||||
lampe.arret();
|
||||
assertEquals(0, lampe.getNiveau());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAttenuer() {
|
||||
Lampe lampe = new Lampe("Cuisine");
|
||||
|
||||
lampe.attenuer(50);
|
||||
assertEquals(50, lampe.getNiveau());
|
||||
|
||||
lampe.attenuer(0);
|
||||
assertEquals(0, lampe.getNiveau());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNiveauNegatif() {
|
||||
Lampe lampe = new Lampe("Lit");
|
||||
|
||||
lampe.attenuer(-10);
|
||||
assertEquals(0, lampe.getNiveau());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetNiveau() {
|
||||
Lampe lampe = new Lampe("Salle de bain");
|
||||
assertEquals(0, lampe.getNiveau());
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package test;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import model.Stereo;
|
||||
|
||||
public class StereoTest {
|
||||
@Test
|
||||
public void testStereoChambre1() {
|
||||
Stereo stereo = new Stereo("Chambre1");
|
||||
Assert.assertEquals(stereo.getLocation(), "Chambre1");
|
||||
}
|
||||
@Test
|
||||
public void testStereoGrenier() {
|
||||
Stereo stereo = new Stereo("Grenier");
|
||||
Assert.assertNotEquals(stereo.getLocation(), "Chambre1");
|
||||
Assert.assertEquals(stereo.getLocation(), "Grenier");
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package test;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import model.TV;
|
||||
|
||||
public class TVTest {
|
||||
@Test
|
||||
public void locationTest() {
|
||||
TV myTv = new TV("Entree");
|
||||
Assert.assertEquals(myTv.getLocation(), "Entree");
|
||||
Assert.assertNotEquals(myTv.getLocation(), "Salon");
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import model.Commande;
|
||||
import model.PasDeCommande;
|
||||
import model.Telecommande;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class TelecommandeTest {
|
||||
|
||||
@Test
|
||||
public void testTelecommande() {
|
||||
Telecommande telecommande = new Telecommande();
|
||||
Commande marcheCommande = new PasDeCommande();
|
||||
Commande arretCommande = new PasDeCommande();
|
||||
|
||||
telecommande.setCommande(0, marcheCommande, arretCommande);
|
||||
telecommande.boutonMarchePresse(0);
|
||||
|
||||
assertEquals(marcheCommande, telecommande.commandeAnnulation);
|
||||
}
|
||||
|
||||
// @Test
|
||||
// public void testToString() {
|
||||
// // Arrange
|
||||
// Telecommande telecommande = new Telecommande();
|
||||
// Commande marcheCommande = new PasDeCommande();
|
||||
// Commande arretCommande = new PasDeCommande();
|
||||
// telecommande.setCommande(0, marcheCommande, arretCommande);
|
||||
//
|
||||
// // Act
|
||||
// String result = telecommande.toString();
|
||||
//
|
||||
// // Assert
|
||||
// String expected = "\n------ Télécommande -------\n" +
|
||||
// "[empt 0] PasDeCommande PasDeCommande\n" +
|
||||
// "[annulation] PasDeCommande\n";
|
||||
// assertEquals(expected, result);
|
||||
// }
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package test;
|
||||
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
import model.Ventilateur;
|
||||
|
||||
public class VentilateurTest {
|
||||
|
||||
@Test
|
||||
public void testRapide() {
|
||||
Ventilateur ventilateur = new Ventilateur("Salon");
|
||||
|
||||
ventilateur.rapide();
|
||||
assertEquals(Ventilateur.RAPIDE, ventilateur.getVitesse());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMoyen() {
|
||||
Ventilateur ventilateur = new Ventilateur("Chambre");
|
||||
|
||||
ventilateur.moyen();
|
||||
|
||||
assertEquals(Ventilateur.MOYEN, ventilateur.getVitesse());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLent() {
|
||||
Ventilateur ventilateur = new Ventilateur("Cuisine");
|
||||
|
||||
ventilateur.lent();
|
||||
|
||||
assertEquals(Ventilateur.LENT, ventilateur.getVitesse());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testArreter() {
|
||||
Ventilateur ventilateur = new Ventilateur("Salle de bain");
|
||||
|
||||
ventilateur.arreter();
|
||||
|
||||
assertEquals(Ventilateur.ARRET, ventilateur.getVitesse());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetVitesse() {
|
||||
Ventilateur ventilateur = new Ventilateur("Salon");
|
||||
|
||||
int result = ventilateur.getVitesse();
|
||||
|
||||
assertEquals(Ventilateur.ARRET, result);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue