Ajout des TP
This commit is contained in:
parent
42bb92022a
commit
e31e638c79
@ -7,4 +7,9 @@ int main(void){
|
||||
printf(" -\"-\"- "); /*idem ici avec les guillemets*/
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
test
|
||||
test
|
||||
test$t
|
||||
test}
|
||||
|
BIN
BUT1/DEV2.1/TD/Exo1.class
Normal file
BIN
BUT1/DEV2.1/TD/Exo1.class
Normal file
Binary file not shown.
21
BUT1/DEV2.1/TD/Exo1.java
Normal file
21
BUT1/DEV2.1/TD/Exo1.java
Normal file
@ -0,0 +1,21 @@
|
||||
public class Exo1{
|
||||
|
||||
public static String plusCourt(String[] tab){
|
||||
try{
|
||||
String min;
|
||||
int i = 0;
|
||||
while(tab[i]==null){
|
||||
i++;
|
||||
}
|
||||
min = tab[i];
|
||||
for(i++;i<tab.length;i++){
|
||||
if((tab[i] != null) && tab[i].length()< min.length()){
|
||||
min = tab[i];
|
||||
}
|
||||
}
|
||||
return min;
|
||||
}catch(ArrayIndexOutOfBoundsException ex){
|
||||
throw new IllegalArgumentException("aucune chaîne trouvée");
|
||||
}
|
||||
}
|
||||
}
|
BIN
BUT1/DEV2.1/TD/Td.class
Normal file
BIN
BUT1/DEV2.1/TD/Td.class
Normal file
Binary file not shown.
@ -1,26 +0,0 @@
|
||||
public interface FileFilter{
|
||||
boolean accept(File f);
|
||||
}
|
||||
|
||||
|
||||
public class DirectoryFilter implements FileFilter{
|
||||
@Override
|
||||
public boolean accept(File f){
|
||||
return f.isDirectory();
|
||||
}
|
||||
}
|
||||
|
||||
public class Exemple{
|
||||
public static void main(String[] args){
|
||||
File home = new File(System.getProperty("user.home"));
|
||||
File[] liste = home.listFiles(new DirectoryFilter());
|
||||
for(File f : liste){
|
||||
System.out.println(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Controleur extends MouseAdapter
|
||||
implements MouseMotionListener, ActionListener{
|
||||
...
|
||||
}
|
BIN
BUT1/DEV2.1/TD/Test.class
Normal file
BIN
BUT1/DEV2.1/TD/Test.class
Normal file
Binary file not shown.
9
BUT1/DEV2.1/TD/Test.java
Normal file
9
BUT1/DEV2.1/TD/Test.java
Normal file
@ -0,0 +1,9 @@
|
||||
public class Test{
|
||||
public static void main(String[] args){
|
||||
try{
|
||||
System.out.println(Exo1.plusCourt(args));
|
||||
}catch(IllegalArgumentException e){
|
||||
System.err.println("Pas d'arguments ?");
|
||||
}
|
||||
}
|
||||
}
|
11
BUT1/DEV2.1/TP6-Dessin/EXO2/test.txt
Normal file
11
BUT1/DEV2.1/TP6-Dessin/EXO2/test.txt
Normal file
@ -0,0 +1,11 @@
|
||||
[0, inf, inf, inf, inf, 1, inf, 1, inf, 2, inf]
|
||||
[inf, 0, 2, 1, 3, inf, 2, inf, 1, inf, 3]
|
||||
[inf, 2, 0, 1, 1, inf, 2, inf, 3, inf, 1]
|
||||
[inf, 1, 1, 0, 2, inf, 1, inf, 2, inf, 2]
|
||||
[inf, 3, 1, 2, 0, inf, 3, inf, 4, inf, 1]
|
||||
[1, inf, inf, inf, inf, 0, inf, 2, inf, 1, inf]
|
||||
[inf, 2, 2, 1, 3, inf, 0, inf, 3, inf, 3]
|
||||
[1, inf, inf, inf, inf, 2, inf, 0, inf, 3, inf]
|
||||
[inf, 1, 3, 2, 4, inf, 3, inf, 0, inf, 4]
|
||||
[2, inf, inf, inf, inf, 1, inf, 3, inf, 0, inf]
|
||||
[inf, 3, 1, 2, 1, inf, 3, inf, 4, inf, 0]
|
BIN
BUT1/DEV2.1/TP8-Évènements/EXO1/Fond$1.class
Normal file
BIN
BUT1/DEV2.1/TP8-Évènements/EXO1/Fond$1.class
Normal file
Binary file not shown.
BIN
BUT1/DEV2.1/TP8-Évènements/EXO1/Fond$2.class
Normal file
BIN
BUT1/DEV2.1/TP8-Évènements/EXO1/Fond$2.class
Normal file
Binary file not shown.
BIN
BUT1/DEV2.1/TP8-Évènements/EXO1/Fond$3.class
Normal file
BIN
BUT1/DEV2.1/TP8-Évènements/EXO1/Fond$3.class
Normal file
Binary file not shown.
BIN
BUT1/DEV2.1/TP8-Évènements/EXO1/Fond.class
Normal file
BIN
BUT1/DEV2.1/TP8-Évènements/EXO1/Fond.class
Normal file
Binary file not shown.
@ -48,6 +48,5 @@ public class Fond implements ActionListener {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
// Vous pouvez implémenter cette méthode si nécessaire
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user