Ajout des travaux effectuer
This commit is contained in:
17
23DEV1.1/TPS2/TP01/controle/Manie/Manie.java
Normal file
17
23DEV1.1/TPS2/TP01/controle/Manie/Manie.java
Normal file
@@ -0,0 +1,17 @@
|
||||
import java.util.Random;
|
||||
|
||||
public class ManieTest{
|
||||
public Manie(){
|
||||
super();
|
||||
}
|
||||
public int RempTab(){
|
||||
Random r=new Random();
|
||||
int[81] tab = new int[];
|
||||
for(int i = 0 ; i < 81 ; i++){
|
||||
tab[i] = 1 + r.nextInt(9);
|
||||
}
|
||||
}
|
||||
public void Tableau(int[] a){
|
||||
System.out
|
||||
}
|
||||
}
|
||||
13
23DEV1.1/TPS2/TP01/controle/Manie/ManieTest.java
Normal file
13
23DEV1.1/TPS2/TP01/controle/Manie/ManieTest.java
Normal file
@@ -0,0 +1,13 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class ManieTest{
|
||||
public static void main(String[] args) {
|
||||
JFrame fenetre = new JFrame("Menu");
|
||||
fenetre.setSize(1040, 1000);
|
||||
fenetre.setLocation(0, 0);
|
||||
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
|
||||
fenetre.setVisible(true);
|
||||
}
|
||||
}
|
||||
13
23DEV1.1/TPS2/TP01/controle/ManieTest.java
Normal file
13
23DEV1.1/TPS2/TP01/controle/ManieTest.java
Normal file
@@ -0,0 +1,13 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class ManieTest{
|
||||
public static void main(String[] args) {
|
||||
JFrame fenetre = new JFrame("Menu");
|
||||
fenetre.setSize(1040, 1000);
|
||||
fenetre.setLocation(0, 0);
|
||||
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
fenetre.add(new Manie());
|
||||
fenetre.setVisible(true);
|
||||
}
|
||||
}
|
||||
BIN
23DEV1.1/TPS2/TP01/controle/Menu.class
Normal file
BIN
23DEV1.1/TPS2/TP01/controle/Menu.class
Normal file
Binary file not shown.
18
23DEV1.1/TPS2/TP01/controle/Menu.java
Normal file
18
23DEV1.1/TPS2/TP01/controle/Menu.java
Normal file
@@ -0,0 +1,18 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class Menu{
|
||||
public static void main(String[] args) {
|
||||
JFrame fenetre = new JFrame("Menu");
|
||||
fenetre.setSize(1040, 1000);
|
||||
fenetre.setLocation(0, 0);
|
||||
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
FlowLayout gestionnaire = new FlowLayout(FlowLayout.CENTER);
|
||||
fenetre.setLayout(gestionnaire);
|
||||
for(int i = 0 ; i < args.length ; i++){
|
||||
JButton boutoninf = new JButton(args[i]);
|
||||
fenetre.add(boutoninf, BorderLayout.CENTER);
|
||||
}
|
||||
fenetre.setVisible(true);
|
||||
}
|
||||
}
|
||||
BIN
23DEV1.1/TPS2/TP01/controle/Monnaie.class
Normal file
BIN
23DEV1.1/TPS2/TP01/controle/Monnaie.class
Normal file
Binary file not shown.
21
23DEV1.1/TPS2/TP01/controle/Monnaie.java
Normal file
21
23DEV1.1/TPS2/TP01/controle/Monnaie.java
Normal file
@@ -0,0 +1,21 @@
|
||||
import java.util.Currency;
|
||||
import java.io.*;
|
||||
import java.lang.*;
|
||||
|
||||
public class Monnaie{
|
||||
public static void main(String[] args) {
|
||||
String code = new String();
|
||||
String symbol = new String();
|
||||
String num = new String();
|
||||
code = args[0];
|
||||
try{
|
||||
Currency coder = Currency.getInstance(code);
|
||||
num = coder.getNumericCodeAsString();
|
||||
symbol = coder.getSymbol();
|
||||
System.out.println("code numérique : "+ num);
|
||||
System.out.println("symbole : "+ symbol);
|
||||
}catch(IllegalArgumentException ie){
|
||||
System.err.println("Valeur invalide");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user