Refonte du repo
This commit is contained in:
parent
4962efbd17
commit
45f4d2dffe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
32
TD10/.vscode/launch.json
vendored
32
TD10/.vscode/launch.json
vendored
@ -1,32 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "CodeLens (Launch) - LectureFichierAffichage",
|
||||
"request": "launch",
|
||||
"mainClass": "input.LectureFichierAffichage",
|
||||
"projectName": "TD10"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "CodeLens (Launch) - Partie",
|
||||
"request": "launch",
|
||||
"mainClass": "pokemon.Partie",
|
||||
"projectName": "TD10"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "CodeLens (Launch) - LectureFichierEcritureESP",
|
||||
"request": "launch",
|
||||
"mainClass": "input.LectureFichierEcritureESP",
|
||||
"projectName": "TD10"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "CodeLens (Launch) - LectureFichier",
|
||||
"request": "launch",
|
||||
"mainClass": "input.LectureFichier",
|
||||
"projectName": "TD10"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,87 +0,0 @@
|
||||
package tripletEntier;
|
||||
|
||||
public class TripletEntier
|
||||
{
|
||||
private int un;
|
||||
private int deux;
|
||||
private int trois;
|
||||
|
||||
public TripletEntier()
|
||||
{
|
||||
un = 0;
|
||||
deux = 0;
|
||||
trois = 0;
|
||||
}
|
||||
|
||||
public TripletEntier(int a, int b, int c)
|
||||
{
|
||||
un = a;
|
||||
deux = b;
|
||||
trois = c;
|
||||
}
|
||||
|
||||
//getter
|
||||
public int getA() {
|
||||
return un;
|
||||
}
|
||||
|
||||
public int getB() {
|
||||
return deux;
|
||||
}
|
||||
|
||||
public int getC() {
|
||||
return trois;
|
||||
}
|
||||
|
||||
//setter
|
||||
public void setA(int a) {
|
||||
this.un = a;
|
||||
}
|
||||
|
||||
public void setB(int b) {
|
||||
this.deux = b;
|
||||
}
|
||||
|
||||
public void setC(int c) {
|
||||
this.trois = c;
|
||||
}
|
||||
/*
|
||||
¸,ø¤º°`°º¤ø,¸¸,ø¤º°°º¤ø,¸¸,ø¤º°`°º¤ø,¸
|
||||
Exercices demandés
|
||||
¸,ø¤º°`°º¤ø,¸¸,ø¤º°°º¤ø,¸¸,ø¤º°`°º¤ø,¸
|
||||
*/
|
||||
|
||||
public int somme()
|
||||
{
|
||||
int ret=this.un+this.deux+this.trois;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String concatenation()
|
||||
{
|
||||
return ""+this.un+this.deux+this.trois;
|
||||
}
|
||||
|
||||
|
||||
public double moyenne()
|
||||
{
|
||||
return ((double) somme() / 3);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "[a=" + un + ", b=" + deux + ", c=" + trois + "]";
|
||||
}
|
||||
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
TripletEntier t = (TripletEntier) o;
|
||||
return (this.un == t.un) && (this.deux == t.deux) && (this.trois == t.trois);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
package fleuriste;
|
||||
/*-------------------------------------------------
|
||||
Tableau Fleurs
|
||||
0 = roses 1 = tulipes 2 = oeillets
|
||||
--------------------------------------------------*/
|
||||
|
||||
public class Bouquet {
|
||||
|
||||
private LotFleur lotFleurs[];
|
||||
|
||||
public LotFleur getLotFleur(int i) {
|
||||
return lotFleurs[i];
|
||||
}
|
||||
|
||||
public void setLotFleur(LotFleur lotFleur, int i) {
|
||||
this.lotFleurs[i] = lotFleur;
|
||||
}
|
||||
|
||||
//instructions
|
||||
public Bouquet(LotFleur l1, LotFleur l2, LotFleur l3){
|
||||
lotFleurs[0] = l1;
|
||||
lotFleurs[1] = l2;
|
||||
lotFleurs[2] = l3;
|
||||
}
|
||||
|
||||
public double prix() {
|
||||
double resultat = 0.;
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
resultat = lotFleurs[i].getFleur().getPrix() * lotFleurs[i].getQuantite() + resultat;
|
||||
}
|
||||
return resultat;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package fleuriste;
|
||||
|
||||
public class Fleur {
|
||||
|
||||
private String nom;
|
||||
private double prix;
|
||||
|
||||
//getters
|
||||
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
|
||||
//setters
|
||||
|
||||
public double getPrix() {
|
||||
return prix;
|
||||
}
|
||||
public void setPrix(double prix) {
|
||||
this.prix = prix;
|
||||
}
|
||||
//instructions
|
||||
|
||||
public Fleur(String nomFleur, double prixFleur) {
|
||||
this.nom = nomFleur;
|
||||
this.prix = prixFleur;
|
||||
}
|
||||
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
package fleuriste;
|
||||
/*-------------------------------------------------
|
||||
Tableau Fleurs
|
||||
0 = roses 1 = tulipes 2 = oeillets
|
||||
--------------------------------------------------*/
|
||||
|
||||
public class Stock {
|
||||
|
||||
private int[] quantite;
|
||||
|
||||
//getters
|
||||
|
||||
public int[] getQuantite() {
|
||||
return quantite;
|
||||
}
|
||||
|
||||
//setters
|
||||
|
||||
public void setQuantite(int[] quantite) {
|
||||
this.quantite = quantite;
|
||||
}
|
||||
|
||||
//Instructions
|
||||
|
||||
public Stock(Fleur f1, Fleur f2, Fleur f3) {
|
||||
quantite[0] = 0;
|
||||
quantite[1] = 0;
|
||||
quantite[2] = 0;
|
||||
}
|
||||
|
||||
public void ajouteFleur(int i, int quantiteFleur) {
|
||||
if(i < 0 || i > 2)
|
||||
{
|
||||
System.err.println("Impossible, il n'y a pas de fleur de ce type !");
|
||||
}
|
||||
|
||||
this.quantite[i] = quantiteFleur;
|
||||
}
|
||||
|
||||
public boolean bouquetFaisable(Bouquet b1) {
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if(quantite[i] > b1.getLotFleur(i).getQuantite())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
package fleuriste;
|
||||
|
||||
public class TestBouquet {
|
||||
public static void main( String[] args) {
|
||||
// nom str nom = nom objet (ex :Tartampion)
|
||||
Fleur rose = new Fleur("rose",2.6);
|
||||
Fleur tulipe = new Fleur("tulipe",0.4);
|
||||
Fleur oeillet = new Fleur("oeillet",1.8);
|
||||
|
||||
LotFleur lotroses = new LotFleur(rose,5);
|
||||
LotFleur lottulipes = new LotFleur(tulipe,7);
|
||||
LotFleur lotoeillets = new LotFleur(oeillet,3);
|
||||
|
||||
Bouquet b = new Bouquet(lotroses, lottulipes, lotoeillets);
|
||||
double prixb = b.prix(); //calcule le prix d'un bouquet
|
||||
System.out.println(b+" : "+prixb+" euros");
|
||||
|
||||
Stock magasin = new Stock(rose,tulipe,oeillet);
|
||||
System.out.println(magasin);
|
||||
magasin.ajouteFleur(0, 100);
|
||||
magasin.ajouteFleur(1, 150);
|
||||
magasin.ajouteFleur(2, 200);
|
||||
System.out.println(magasin);
|
||||
// Est-ce que le stock permet de produire le bouquet b ?
|
||||
boolean orderBouquet = magasin.bouquetFaisable(b);
|
||||
System.out.println(orderBouquet);
|
||||
}
|
||||
}
|
18
TD6/.vscode/launch.json
vendored
18
TD6/.vscode/launch.json
vendored
@ -1,18 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "CodeLens (Launch) - TestPokemon",
|
||||
"request": "launch",
|
||||
"mainClass": "pkmA.TestPokemon",
|
||||
"projectName": "TD6"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "CodeLens (Launch) - GestionVehicule",
|
||||
"request": "launch",
|
||||
"mainClass": "vehicule.GestionVehicule",
|
||||
"projectName": "TD6"
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
18
TD8/.vscode/launch.json
vendored
18
TD8/.vscode/launch.json
vendored
@ -1,18 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "CodeLens (Launch) - TestPokemon",
|
||||
"request": "launch",
|
||||
"mainClass": "pokemon.TestPokemon",
|
||||
"projectName": "TD8"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "CodeLens (Launch) - TestExercices",
|
||||
"request": "launch",
|
||||
"mainClass": "services.TestExercices",
|
||||
"projectName": "TD8"
|
||||
}
|
||||
]
|
||||
}
|
18
TD9/.vscode/launch.json
vendored
18
TD9/.vscode/launch.json
vendored
@ -1,18 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "CodeLens (Launch) - TestPokemon",
|
||||
"request": "launch",
|
||||
"mainClass": "pokemon.TestPokemon",
|
||||
"projectName": "TD9"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "CodeLens (Launch) - main",
|
||||
"request": "launch",
|
||||
"mainClass": "comparable.main",
|
||||
"projectName": "TD9"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package pokemon;
|
||||
|
||||
enum Type {
|
||||
|
||||
EAU("EAU"),
|
||||
ELECTRIK("ELECTRIK"),
|
||||
FEU("FEU"),
|
||||
PLANTE("PLANTE");
|
||||
|
||||
Type(String s) {
|
||||
description = s;
|
||||
}
|
||||
|
||||
private String description;
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
package journey;
|
||||
|
||||
public class Point
|
||||
{
|
||||
//attributs
|
||||
private double x;
|
||||
private double y;
|
||||
public List<Trajet> trajet = new ArrayList<Trajet> ();
|
||||
|
||||
|
||||
//constructeurs
|
||||
public Point()
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
public Point(double x, double y)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
//methode d'instance
|
||||
public String toString()
|
||||
{
|
||||
return "(X = " + this.x + " - Y = " + this.y + ")";
|
||||
}
|
||||
|
||||
public double getDistance(Point p)
|
||||
{
|
||||
double result;
|
||||
result = Math.sqrt(Math.pow(this.x - p.x, 2) + Math.pow(this.y - p.y, 2));
|
||||
return result;
|
||||
}
|
||||
|
||||
//accesseur en lecture
|
||||
public double getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public double getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public Point projX()
|
||||
{
|
||||
return new Point(this.x, 0.);
|
||||
}
|
||||
|
||||
public Point projY()
|
||||
{
|
||||
return new Point(0., this.y);
|
||||
}
|
||||
|
||||
public boolean equals (Object obj)
|
||||
{
|
||||
Point p = (Point)obj;
|
||||
if (this.x == p.x && this.y == p.y)
|
||||
return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
public Point clone()
|
||||
{
|
||||
return new Point(this.x, this.y);
|
||||
}
|
||||
|
||||
public void getLocation()
|
||||
{
|
||||
System.out.println("x = " + this.x + " , y = " + this.y + ".");
|
||||
}
|
||||
|
||||
public void setLocation(Point p)
|
||||
{
|
||||
p.x = this.x;
|
||||
p.y = this.y;
|
||||
}
|
||||
public void setLocation(double x, double y)
|
||||
{
|
||||
x = this.x;
|
||||
y = this.y;
|
||||
}
|
||||
|
||||
public void translate(int dx, int dy)
|
||||
{
|
||||
this.x = this.x+dx;
|
||||
this.y = this.y+dy;
|
||||
}
|
||||
|
||||
//getters and setters
|
||||
public void setX(double x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
public void setY(double y) {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,32 +0,0 @@
|
||||
package journey;
|
||||
|
||||
public class Trajet {
|
||||
private String nom;
|
||||
private Integer nombrePoints;
|
||||
private int tabDistance[];
|
||||
|
||||
public int getTabDistance[]() {
|
||||
|
||||
return this.tabDistance[];
|
||||
}
|
||||
|
||||
public void setTabDistance[](final int value) {
|
||||
this.tabDistance[] = value;
|
||||
}
|
||||
|
||||
public String getNom() {
|
||||
return this.nom;
|
||||
}
|
||||
|
||||
public void setNom(final String value) {
|
||||
this.nom = value;
|
||||
}
|
||||
|
||||
public Integer getNombrePoints() {
|
||||
return this.nombrePoints;
|
||||
}
|
||||
|
||||
public void sommeDistance() {
|
||||
}
|
||||
}
|
||||
|
0
TD1/TD1.pdf → TDs/TD1.pdf
Executable file → Normal file
0
TD1/TD1.pdf → TDs/TD1.pdf
Executable file → Normal file
0
TD10/TD10.pdf → TDs/TD10.pdf
Executable file → Normal file
0
TD10/TD10.pdf → TDs/TD10.pdf
Executable file → Normal file
0
TD2/TD2.pdf → TDs/TD2.pdf
Executable file → Normal file
0
TD2/TD2.pdf → TDs/TD2.pdf
Executable file → Normal file
0
TD3/TD3.pdf → TDs/TD3.pdf
Executable file → Normal file
0
TD3/TD3.pdf → TDs/TD3.pdf
Executable file → Normal file
0
TD4/TD4.pdf → TDs/TD4.pdf
Executable file → Normal file
0
TD4/TD4.pdf → TDs/TD4.pdf
Executable file → Normal file
0
TD5/TD5.pdf → TDs/TD5.pdf
Executable file → Normal file
0
TD5/TD5.pdf → TDs/TD5.pdf
Executable file → Normal file
0
TD6/TD6.pdf → TDs/TD6.pdf
Executable file → Normal file
0
TD6/TD6.pdf → TDs/TD6.pdf
Executable file → Normal file
0
TD7/TD7.pdf → TDs/TD7.pdf
Executable file → Normal file
0
TD7/TD7.pdf → TDs/TD7.pdf
Executable file → Normal file
0
TD8/TD8.pdf → TDs/TD8.pdf
Executable file → Normal file
0
TD8/TD8.pdf → TDs/TD8.pdf
Executable file → Normal file
0
TD9/TD9.pdf → TDs/TD9.pdf
Executable file → Normal file
0
TD9/TD9.pdf → TDs/TD9.pdf
Executable file → Normal file
0
TD1/src/HelloWorld.java → src/TD1/HelloWorld.java
Executable file → Normal file
0
TD1/src/HelloWorld.java → src/TD1/HelloWorld.java
Executable file → Normal file
0
TD1/src/point/Point.java → src/TD1/point/Point.java
Executable file → Normal file
0
TD1/src/point/Point.java → src/TD1/point/Point.java
Executable file → Normal file
0
TD1/src/point/PointTest.java → src/TD1/point/PointTest.java
Executable file → Normal file
0
TD1/src/point/PointTest.java → src/TD1/point/PointTest.java
Executable file → Normal file
0
TD1/src/point/TestPoint.java → src/TD1/point/TestPoint.java
Executable file → Normal file
0
TD1/src/point/TestPoint.java → src/TD1/point/TestPoint.java
Executable file → Normal file
0
TD10/src/input/LectureFichierAffichage.java → src/TD10/input/LectureFichierAffichage.java
Executable file → Normal file
0
TD10/src/input/LectureFichierAffichage.java → src/TD10/input/LectureFichierAffichage.java
Executable file → Normal file
0
TD10/src/input/LectureFichierEcriture.java → src/TD10/input/LectureFichierEcriture.java
Executable file → Normal file
0
TD10/src/input/LectureFichierEcriture.java → src/TD10/input/LectureFichierEcriture.java
Executable file → Normal file
0
TD10/src/input/LectureFichierEcritureESP.java → src/TD10/input/LectureFichierEcritureESP.java
Executable file → Normal file
0
TD10/src/input/LectureFichierEcritureESP.java → src/TD10/input/LectureFichierEcritureESP.java
Executable file → Normal file
0
TD10/src/pokemon/Joueur.java → src/TD10/pokemon/Joueur.java
Executable file → Normal file
0
TD10/src/pokemon/Joueur.java → src/TD10/pokemon/Joueur.java
Executable file → Normal file
0
TD10/src/pokemon/Partie.java → src/TD10/pokemon/Partie.java
Executable file → Normal file
0
TD10/src/pokemon/Partie.java → src/TD10/pokemon/Partie.java
Executable file → Normal file
0
TD9/src/pokemon/Pokemon.java → src/TD10/pokemon/Pokemon.java
Executable file → Normal file
0
TD9/src/pokemon/Pokemon.java → src/TD10/pokemon/Pokemon.java
Executable file → Normal file
0
TD9/src/pokemon/PokemonEAU.java → src/TD10/pokemon/PokemonEAU.java
Executable file → Normal file
0
TD9/src/pokemon/PokemonEAU.java → src/TD10/pokemon/PokemonEAU.java
Executable file → Normal file
0
TD8/src/pokemon/PokemonELECTRIK.java → src/TD10/pokemon/PokemonELECTRIK.java
Executable file → Normal file
0
TD8/src/pokemon/PokemonELECTRIK.java → src/TD10/pokemon/PokemonELECTRIK.java
Executable file → Normal file
0
TD9/src/pokemon/PokemonFEU.java → src/TD10/pokemon/PokemonFEU.java
Executable file → Normal file
0
TD9/src/pokemon/PokemonFEU.java → src/TD10/pokemon/PokemonFEU.java
Executable file → Normal file
0
TD10/src/pokemon/PokemonPLANTE.java → src/TD10/pokemon/PokemonPLANTE.java
Executable file → Normal file
0
TD10/src/pokemon/PokemonPLANTE.java → src/TD10/pokemon/PokemonPLANTE.java
Executable file → Normal file
0
TD9/src/pokemon/TestPokemon.java → src/TD10/pokemon/TestPokemon.java
Executable file → Normal file
0
TD9/src/pokemon/TestPokemon.java → src/TD10/pokemon/TestPokemon.java
Executable file → Normal file
0
TD8/src/pokemon/Type.java → src/TD10/pokemon/Type.java
Executable file → Normal file
0
TD8/src/pokemon/Type.java → src/TD10/pokemon/Type.java
Executable file → Normal file
0
TD10/-France_Codepostal_2009.txt → src/TD10/txt/-France_Codepostal_2009.txt
Executable file → Normal file
0
TD10/-France_Codepostal_2009.txt → src/TD10/txt/-France_Codepostal_2009.txt
Executable file → Normal file
0
TD10/-France_Codepostal_2009_esp.txt → src/TD10/txt/-France_Codepostal_2009_esp.txt
Executable file → Normal file
0
TD10/-France_Codepostal_2009_esp.txt → src/TD10/txt/-France_Codepostal_2009_esp.txt
Executable file → Normal file
0
TD10/-ListePokemon.txt → src/TD10/txt/-ListePokemon.txt
Executable file → Normal file
0
TD10/-ListePokemon.txt → src/TD10/txt/-ListePokemon.txt
Executable file → Normal file
0
TD10/France_Code_Postal_2009.txt → src/TD10/txt/France_Code_Postal_2009.txt
Executable file → Normal file
0
TD10/France_Code_Postal_2009.txt → src/TD10/txt/France_Code_Postal_2009.txt
Executable file → Normal file
0
TD10/France_Code_Postal_2009ESP.txt → src/TD10/txt/France_Code_Postal_2009ESP.txt
Executable file → Normal file
0
TD10/France_Code_Postal_2009ESP.txt → src/TD10/txt/France_Code_Postal_2009ESP.txt
Executable file → Normal file
0
TD10/France_Communes_2009.txt → src/TD10/txt/France_Communes_2009.txt
Executable file → Normal file
0
TD10/France_Communes_2009.txt → src/TD10/txt/France_Communes_2009.txt
Executable file → Normal file
0
TD10/France_Communes_2009ESP.txt → src/TD10/txt/France_Communes_2009ESP.txt
Executable file → Normal file
0
TD10/France_Communes_2009ESP.txt → src/TD10/txt/France_Communes_2009ESP.txt
Executable file → Normal file
0
TD2/src/ensembleEntierBorne/EnsembleEntierBorne.java → src/TD2/ensembleEntierBorne/EnsembleEntierBorne.java
Executable file → Normal file
0
TD2/src/ensembleEntierBorne/EnsembleEntierBorne.java → src/TD2/ensembleEntierBorne/EnsembleEntierBorne.java
Executable file → Normal file
0
TD2/src/ensembleEntierBorne/TestEnsembleEntierBorne.java → src/TD2/ensembleEntierBorne/TestEnsembleEntierBorne.java
Executable file → Normal file
0
TD2/src/ensembleEntierBorne/TestEnsembleEntierBorne.java → src/TD2/ensembleEntierBorne/TestEnsembleEntierBorne.java
Executable file → Normal file
0
TD2/src/test/TestTriplet.java → src/TD2/test/TestTriplet.java
Executable file → Normal file
0
TD2/src/test/TestTriplet.java → src/TD2/test/TestTriplet.java
Executable file → Normal file
12
TD2/src/tripletEntier/TestTripletEntier.java → src/TD2/tripletEntier/TestTripletEntier.java
Executable file → Normal file
12
TD2/src/tripletEntier/TestTripletEntier.java → src/TD2/tripletEntier/TestTripletEntier.java
Executable file → Normal file
@ -15,13 +15,13 @@ public class TestTripletEntier
|
||||
TripletEntier t2 = new TripletEntier(1, 2, 3);
|
||||
|
||||
System.out.println(t2);
|
||||
/*String resConcat = t2.concatenation();
|
||||
String resConcat = t2.concatenation();
|
||||
|
||||
/*System.out.println(resConcat);
|
||||
System.out.println(resConcat);
|
||||
System.out.println(resConcat == "123");
|
||||
System.out.println(resConcat.equals("123"));
|
||||
System.out.println("Moyenne "+t2+" = "+t2.moyenne());
|
||||
System.out.println();*/
|
||||
System.out.println();
|
||||
|
||||
System.out.println(new TripletEntier(1, 2, 4).moyenne());
|
||||
System.out.println();
|
||||
@ -32,10 +32,12 @@ public class TestTripletEntier
|
||||
System.out.println(t3.moyenne() == 1.666667);
|
||||
System.out.println();
|
||||
|
||||
/*t1.ajoutElement(5, 2);
|
||||
/*
|
||||
t1.ajoutElement(5, 2);
|
||||
System.out.println(t1);
|
||||
t1.ajoutElement(5, 5);
|
||||
t1.ajout1erElement(10);
|
||||
System.out.println(t1);*/
|
||||
System.out.println(t1);
|
||||
*/
|
||||
}
|
||||
}
|
52
src/TD2/tripletEntier/TripletEntier.java
Normal file
52
src/TD2/tripletEntier/TripletEntier.java
Normal file
@ -0,0 +1,52 @@
|
||||
package tripletEntier;
|
||||
|
||||
public class TripletEntier {
|
||||
|
||||
private int unA;
|
||||
private int unB;
|
||||
private int unC;
|
||||
|
||||
public TripletEntier(int a, int b, int c) {
|
||||
this.unA = a;
|
||||
this.unB = b;
|
||||
this.unC = c;
|
||||
}
|
||||
|
||||
public TripletEntier() {
|
||||
}
|
||||
|
||||
public int somme() {
|
||||
return this.unA + this.unB + this.unC;
|
||||
}
|
||||
|
||||
public float moyenne() {
|
||||
return (float)this.somme()/3;
|
||||
}
|
||||
|
||||
public String concatenation() {
|
||||
return "" + this.unA + this.unB + this.unC;
|
||||
}
|
||||
|
||||
public void ajoutElement(int e) {
|
||||
this.unA = e;
|
||||
}
|
||||
|
||||
public boolean contient(int e) {
|
||||
return (this.unA == e) || (this.unB == e) || (this.unC == e);
|
||||
}
|
||||
|
||||
public boolean equals(TripletEntier t) {
|
||||
return (this.unA == t.unA) && (this.unB == t.unB) && (this.unC == t.unC);
|
||||
}
|
||||
|
||||
public TripletEntier clone(TripletEntier t) {
|
||||
return new TripletEntier(t.unA, t.unB, t.unC);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[" + this.unA + "," + this.unB + "," + this.unC +"]";
|
||||
}
|
||||
|
||||
}
|
||||
|
0
TD3 src/boite/Boite.java → src/TD3/boite/Boite.java
Executable file → Normal file
0
TD3 src/boite/Boite.java → src/TD3/boite/Boite.java
Executable file → Normal file
0
TD3 src/boite/Objet.java → src/TD3/boite/Objet.java
Executable file → Normal file
0
TD3 src/boite/Objet.java → src/TD3/boite/Objet.java
Executable file → Normal file
0
TD3 src/boite/testBoite.java → src/TD3/boite/testBoite.java
Executable file → Normal file
0
TD3 src/boite/testBoite.java → src/TD3/boite/testBoite.java
Executable file → Normal file
0
TD3 src/fleuriste/Bouquet.java → src/TD3/fleuriste/Bouquet.java
Executable file → Normal file
0
TD3 src/fleuriste/Bouquet.java → src/TD3/fleuriste/Bouquet.java
Executable file → Normal file
0
TD3 src/fleuriste/Fleur.java → src/TD3/fleuriste/Fleur.java
Executable file → Normal file
0
TD3 src/fleuriste/Fleur.java → src/TD3/fleuriste/Fleur.java
Executable file → Normal file
0
TD3/src/fleuriste/LotFleur.java → src/TD3/fleuriste/LotFleur.java
Executable file → Normal file
0
TD3/src/fleuriste/LotFleur.java → src/TD3/fleuriste/LotFleur.java
Executable file → Normal file
0
TD3 src/fleuriste/LotFleurs.java → src/TD3/fleuriste/LotFleurs.java
Executable file → Normal file
0
TD3 src/fleuriste/LotFleurs.java → src/TD3/fleuriste/LotFleurs.java
Executable file → Normal file
0
TD3 src/fleuriste/Stock.java → src/TD3/fleuriste/Stock.java
Executable file → Normal file
0
TD3 src/fleuriste/Stock.java → src/TD3/fleuriste/Stock.java
Executable file → Normal file
0
TD3 src/fleuriste/TestBouquet.java → src/TD3/fleuriste/TestBouquet.java
Executable file → Normal file
0
TD3 src/fleuriste/TestBouquet.java → src/TD3/fleuriste/TestBouquet.java
Executable file → Normal file
0
TD3/src/segment/Segment.java → src/TD3/segment/Segment.java
Executable file → Normal file
0
TD3/src/segment/Segment.java → src/TD3/segment/Segment.java
Executable file → Normal file
0
TD3/src/segment/TestSegment.java → src/TD3/segment/TestSegment.java
Executable file → Normal file
0
TD3/src/segment/TestSegment.java → src/TD3/segment/TestSegment.java
Executable file → Normal file
0
TD3 src/segments/Segment.java → src/TD3/segments/Segment.java
Executable file → Normal file
0
TD3 src/segments/Segment.java → src/TD3/segments/Segment.java
Executable file → Normal file
0
TD3 src/segments/TestSegment.java → src/TD3/segments/TestSegment.java
Executable file → Normal file
0
TD3 src/segments/TestSegment.java → src/TD3/segments/TestSegment.java
Executable file → Normal file
0
TD4/src/pointcolore/PointColore.java → src/TD4/pointcolore/PointColore.java
Executable file → Normal file
0
TD4/src/pointcolore/PointColore.java → src/TD4/pointcolore/PointColore.java
Executable file → Normal file
0
TD4/src/pointcolore/TestPointColore.java → src/TD4/pointcolore/TestPointColore.java
Executable file → Normal file
0
TD4/src/pointcolore/TestPointColore.java → src/TD4/pointcolore/TestPointColore.java
Executable file → Normal file
0
TD6/src/vehicule/Avion.java → src/TD4/vehicule/Avion.java
Executable file → Normal file
0
TD6/src/vehicule/Avion.java → src/TD4/vehicule/Avion.java
Executable file → Normal file
0
TD6/src/vehicule/GestionVehicule.java → src/TD4/vehicule/GestionVehicule.java
Executable file → Normal file
0
TD6/src/vehicule/GestionVehicule.java → src/TD4/vehicule/GestionVehicule.java
Executable file → Normal file
0
TD4/src/vehicule/Vehicule.java → src/TD4/vehicule/Vehicule.java
Executable file → Normal file
0
TD4/src/vehicule/Vehicule.java → src/TD4/vehicule/Vehicule.java
Executable file → Normal file
0
TD6/src/vehicule/Voiture.java → src/TD4/vehicule/Voiture.java
Executable file → Normal file
0
TD6/src/vehicule/Voiture.java → src/TD4/vehicule/Voiture.java
Executable file → Normal file
0
TD5/src/pointcolore/PointColore.java → src/TD5/pointcolore/PointColore.java
Executable file → Normal file
0
TD5/src/pointcolore/PointColore.java → src/TD5/pointcolore/PointColore.java
Executable file → Normal file
0
TD5/src/pointcolore/TestPointColore.java → src/TD5/pointcolore/TestPointColore.java
Executable file → Normal file
0
TD5/src/pointcolore/TestPointColore.java → src/TD5/pointcolore/TestPointColore.java
Executable file → Normal file
0
TD5/src/pokemon/Pokemon.java → src/TD5/pokemon/Pokemon.java
Executable file → Normal file
0
TD5/src/pokemon/Pokemon.java → src/TD5/pokemon/Pokemon.java
Executable file → Normal file
0
TD5/src/pokemon/PokemonEAU.java → src/TD5/pokemon/PokemonEAU.java
Executable file → Normal file
0
TD5/src/pokemon/PokemonEAU.java → src/TD5/pokemon/PokemonEAU.java
Executable file → Normal file
0
TD5/src/pokemon/PokemonELECTRIK.java → src/TD5/pokemon/PokemonELECTRIK.java
Executable file → Normal file
0
TD5/src/pokemon/PokemonELECTRIK.java → src/TD5/pokemon/PokemonELECTRIK.java
Executable file → Normal file
0
TD5/src/pokemon/PokemonFEU.java → src/TD5/pokemon/PokemonFEU.java
Executable file → Normal file
0
TD5/src/pokemon/PokemonFEU.java → src/TD5/pokemon/PokemonFEU.java
Executable file → Normal file
0
TD5/src/pokemon/PokemonPLANTE.java → src/TD5/pokemon/PokemonPLANTE.java
Executable file → Normal file
0
TD5/src/pokemon/PokemonPLANTE.java → src/TD5/pokemon/PokemonPLANTE.java
Executable file → Normal file
0
TD5/src/pokemon/TestPokemon.java → src/TD5/pokemon/TestPokemon.java
Executable file → Normal file
0
TD5/src/pokemon/TestPokemon.java → src/TD5/pokemon/TestPokemon.java
Executable file → Normal file
0
TD10/src/pokemon/Type.java → src/TD5/pokemon/Type.java
Executable file → Normal file
0
TD10/src/pokemon/Type.java → src/TD5/pokemon/Type.java
Executable file → Normal file
0
TD6/src/pkmA/Attaque.java → src/TD6/pkmA/Attaque.java
Executable file → Normal file
0
TD6/src/pkmA/Attaque.java → src/TD6/pkmA/Attaque.java
Executable file → Normal file
0
TD6/src/pkmA/Pokemon.java → src/TD6/pkmA/Pokemon.java
Executable file → Normal file
0
TD6/src/pkmA/Pokemon.java → src/TD6/pkmA/Pokemon.java
Executable file → Normal file
0
TD6/src/pkmA/PokemonEAU.java → src/TD6/pkmA/PokemonEAU.java
Executable file → Normal file
0
TD6/src/pkmA/PokemonEAU.java → src/TD6/pkmA/PokemonEAU.java
Executable file → Normal file
0
TD6/src/pkmA/PokemonELECTRIK.java → src/TD6/pkmA/PokemonELECTRIK.java
Executable file → Normal file
0
TD6/src/pkmA/PokemonELECTRIK.java → src/TD6/pkmA/PokemonELECTRIK.java
Executable file → Normal file
0
TD6/src/pkmA/PokemonFEU.java → src/TD6/pkmA/PokemonFEU.java
Executable file → Normal file
0
TD6/src/pkmA/PokemonFEU.java → src/TD6/pkmA/PokemonFEU.java
Executable file → Normal file
0
TD6/src/pkmA/PokemonPLANTE.java → src/TD6/pkmA/PokemonPLANTE.java
Executable file → Normal file
0
TD6/src/pkmA/PokemonPLANTE.java → src/TD6/pkmA/PokemonPLANTE.java
Executable file → Normal file
0
TD6/src/pkmA/TestPokemon.java → src/TD6/pkmA/TestPokemon.java
Executable file → Normal file
0
TD6/src/pkmA/TestPokemon.java → src/TD6/pkmA/TestPokemon.java
Executable file → Normal file
0
TD6/src/pkmA/Type.java → src/TD6/pkmA/Type.java
Executable file → Normal file
0
TD6/src/pkmA/Type.java → src/TD6/pkmA/Type.java
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user