Ajout d'exo et de TP
This commit is contained in:
parent
dc767c9f72
commit
0e1a11cb23
BIN
BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO1/Monnaie.class
Normal file
BIN
BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO1/Monnaie.class
Normal file
Binary file not shown.
16
BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO1/Monnaie.java
Normal file
16
BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO1/Monnaie.java
Normal file
@ -0,0 +1,16 @@
|
||||
import java.lang.Object;
|
||||
import java.util.Currency;
|
||||
|
||||
public class Monnaie{
|
||||
public static void main(String args[]){
|
||||
if(args.length > 0){
|
||||
String nom_monnaie = args[0];
|
||||
Currency monnaie = Currency.getInstance(nom_monnaie);
|
||||
System.out.println("Code numerique : "+monnaie.getNumericCode());
|
||||
System.out.println("Symbole : "+ monnaie.getSymbol());
|
||||
}else{
|
||||
System.out.println("Merci d'indiquer une valeur EX : \"EUR\"");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
BIN
BUT1/DEV2.1/TP5-Heritage/EXO1/Documentation.class
Normal file
BIN
BUT1/DEV2.1/TP5-Heritage/EXO1/Documentation.class
Normal file
Binary file not shown.
19
BUT1/DEV2.1/TP5-Heritage/EXO1/Documentation.java
Normal file
19
BUT1/DEV2.1/TP5-Heritage/EXO1/Documentation.java
Normal file
@ -0,0 +1,19 @@
|
||||
import java.lang.Object;
|
||||
import java.lang.Number;
|
||||
import java.lang.Integer;
|
||||
|
||||
public class Documentation{
|
||||
public static void main(String args[]){
|
||||
|
||||
/* Programme qui convertie les arguments en majuscule
|
||||
for(String element : args){
|
||||
System.out.println(element.toUpperCase());
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
int chiffrEnInt = Integer.parseInt(args[0],8);
|
||||
String truc = toString(toString(chiffrEnInt,10));
|
||||
System.out.println(toString(truc,16));
|
||||
}
|
||||
}
|
6
BUT1/DEV2.1/TP5-Heritage/EXO1/reponses.txt
Normal file
6
BUT1/DEV2.1/TP5-Heritage/EXO1/reponses.txt
Normal file
@ -0,0 +1,6 @@
|
||||
Voici les réponses de la question n°1 (Documentation) :
|
||||
|
||||
- On trouve la classe String dans le package java.lang.
|
||||
- Elle hérite de la classe Object.
|
||||
- 5 méthodes sont transmises par la classe mère (INFORMATION PAS SUR)
|
||||
-
|
Loading…
Reference in New Issue
Block a user