diff --git a/DEV2.1/TP4:Heritage/Documentation/Deuxieme.class b/DEV2.1/TP4:Heritage/Documentation/Deuxieme.class new file mode 100644 index 0000000..42804a6 Binary files /dev/null and b/DEV2.1/TP4:Heritage/Documentation/Deuxieme.class differ diff --git a/DEV2.1/TP4:Heritage/Documentation/Deuxieme.java b/DEV2.1/TP4:Heritage/Documentation/Deuxieme.java new file mode 100644 index 0000000..3c47329 --- /dev/null +++ b/DEV2.1/TP4:Heritage/Documentation/Deuxieme.java @@ -0,0 +1,11 @@ + +public class Deuxieme{ + + public static void main(String[] args) { + if (args.length <= 0){ + System.err.println("args missing"); + System.exit(1); + } Integer parseInt8 = Integer.parseInt(args[0], 8); + System.out.println(Integer.toHexString(parseInt8)); + } +} \ No newline at end of file diff --git a/DEV2.1/TP4:Heritage/Documentation/Premier.class b/DEV2.1/TP4:Heritage/Documentation/Premier.class new file mode 100644 index 0000000..13ce390 Binary files /dev/null and b/DEV2.1/TP4:Heritage/Documentation/Premier.class differ diff --git a/DEV2.1/TP4:Heritage/Documentation/Premier.java b/DEV2.1/TP4:Heritage/Documentation/Premier.java new file mode 100644 index 0000000..a241996 --- /dev/null +++ b/DEV2.1/TP4:Heritage/Documentation/Premier.java @@ -0,0 +1,10 @@ +import java.lang.*; + +public class Premier{ + + public static void main(String[] args) { + for (String arg: args){ + System.out.println(arg.toUpperCase()); + } + } +} \ No newline at end of file diff --git a/DEV2.1/TP4:Heritage/Grisaille.class b/DEV2.1/TP4:Heritage/Grisaille.class new file mode 100644 index 0000000..e36c669 Binary files /dev/null and b/DEV2.1/TP4:Heritage/Grisaille.class differ diff --git a/DEV2.1/TP4:Heritage/Grisaille.java b/DEV2.1/TP4:Heritage/Grisaille.java new file mode 100644 index 0000000..6657ca1 --- /dev/null +++ b/DEV2.1/TP4:Heritage/Grisaille.java @@ -0,0 +1,24 @@ +import javax.swing.*; +import java.awt.*; + +public class Grisaille extends Color{ + + public Grisaille(int val){ + super(val, val, val); + } + + public static void main(String[] args) { + if (args.length <= 0){ + System.err.println("args missing"); + System.exit(1); + } Integer arg = Integer.parseInt(args[0], 10); + JFrame fenetre = new JFrame(); + fenetre.setSize(400, 200); + fenetre.setLocation(0, 0); + fenetre.setVisible(true); + JPanel panel = new JPanel(); + panel.setBackground(new Grisaille(arg)); + fenetre.add(panel); + fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + } +} \ No newline at end of file