Commit 15:18
Poisson mostly okay, merlu and mackerel here and data parsing existing
This commit is contained in:
11
Projet.iml
Normal file
11
Projet.iml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
10
src/ecoparasite/input/DataParsing.java
Normal file
10
src/ecoparasite/input/DataParsing.java
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package ecoparasite.input;
|
||||||
|
|
||||||
|
import ecoparasite.poisson.Poisson;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
|
||||||
|
public interface DataParsing {
|
||||||
|
|
||||||
|
public HashSet<Poisson> parse(RawData data);
|
||||||
|
}
|
||||||
4
src/ecoparasite/input/RawData.java
Normal file
4
src/ecoparasite/input/RawData.java
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
package ecoparasite.input;
|
||||||
|
|
||||||
|
public class RawData {
|
||||||
|
}
|
||||||
22
src/ecoparasite/poisson/Mackerel.java
Normal file
22
src/ecoparasite/poisson/Mackerel.java
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
package ecoparasite.poisson;
|
||||||
|
|
||||||
|
import ecoparasite.input.DataParsing;
|
||||||
|
import ecoparasite.input.RawData;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
|
||||||
|
public class Mackerel extends Poisson implements DataParsing {
|
||||||
|
public Mackerel(String species, Double length, Double infestation) {
|
||||||
|
super(species, length, null, infestation);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HashSet<Poisson> parse(RawData data) {
|
||||||
|
|
||||||
|
HashSet<Poisson> fishSet;
|
||||||
|
fishSet = new HashSet<>();
|
||||||
|
|
||||||
|
|
||||||
|
return fishSet;
|
||||||
|
}
|
||||||
|
}
|
||||||
22
src/ecoparasite/poisson/Merlu.java
Normal file
22
src/ecoparasite/poisson/Merlu.java
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
package ecoparasite.poisson;
|
||||||
|
|
||||||
|
import ecoparasite.input.DataParsing;
|
||||||
|
import ecoparasite.input.RawData;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
|
||||||
|
public class Merlu extends Poisson implements DataParsing {
|
||||||
|
public Merlu(String species, Double length, Double infestation) {
|
||||||
|
super(species, length, null, infestation);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HashSet<Poisson> parse(RawData data) {
|
||||||
|
|
||||||
|
HashSet<Poisson> fishSet;
|
||||||
|
fishSet = new HashSet<>();
|
||||||
|
|
||||||
|
|
||||||
|
return fishSet;
|
||||||
|
}
|
||||||
|
}
|
||||||
4
src/ecoparasite/poisson/PartiePoisson.java
Normal file
4
src/ecoparasite/poisson/PartiePoisson.java
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
package ecoparasite.poisson;
|
||||||
|
|
||||||
|
public abstract class PartiePoisson {
|
||||||
|
}
|
||||||
41
src/ecoparasite/poisson/Poisson.java
Normal file
41
src/ecoparasite/poisson/Poisson.java
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
package ecoparasite.poisson;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
|
||||||
|
public class Poisson{
|
||||||
|
|
||||||
|
private String specie;
|
||||||
|
private Double length;
|
||||||
|
private Double weight;
|
||||||
|
private Double infestation;
|
||||||
|
protected HashSet<PartiePoisson> fishParts;
|
||||||
|
|
||||||
|
public Poisson(String specie, Double length, Double weight, Double infestation){
|
||||||
|
this.specie = specie;
|
||||||
|
this.length = length;
|
||||||
|
this.weight = weight;
|
||||||
|
this.infestation = infestation;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getSpecie() {
|
||||||
|
return specie;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getLength() {
|
||||||
|
return length;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getInfestation() {
|
||||||
|
return infestation;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user