TP3
This commit is contained in:
Binary file not shown.
@@ -21,7 +21,7 @@ public class LectureFichier {
|
||||
for (String info : infosTab) {
|
||||
System.out.println(info);
|
||||
}
|
||||
this.image = new BufferedImage(Integer.parseInt(infosTab[0]), Integer.parseInt(infosTab[1]), BufferedImage.TYPE_3BYTE_BGR);
|
||||
this.image = new BufferedImage(Integer.parseInt(infosTab[1]), Integer.parseInt(infosTab[2]), BufferedImage.TYPE_3BYTE_BGR);
|
||||
|
||||
char[] caracteres = new char[15];
|
||||
Color[] couleurs = new Color[15];
|
||||
@@ -46,7 +46,7 @@ public class LectureFichier {
|
||||
String ligne = lecture.readLine().replaceAll("\"", "");
|
||||
ligne = ligne.substring(0, ligne.length()-1);
|
||||
|
||||
for (int j = 0; j != ligne.length(); j++) {
|
||||
for (int j = 0; j != Integer.parseInt(infosTab[0]); j++) {
|
||||
for (int k = 0; k != caracteres.length; k++) {
|
||||
if (caracteres[k] == ligne.charAt(j)) {
|
||||
this.image.setRGB(i, j, couleurs[k].getRGB());
|
||||
|
3
DEV2.1/TP13/03_Questionnaire/LectureFichier.java
Normal file
3
DEV2.1/TP13/03_Questionnaire/LectureFichier.java
Normal file
@@ -0,0 +1,3 @@
|
||||
import java.awt.*;
|
||||
import java.io.*;
|
||||
|
5
DEV2.1/TP13/03_Questionnaire/Main.java
Normal file
5
DEV2.1/TP13/03_Questionnaire/Main.java
Normal file
@@ -0,0 +1,5 @@
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
LectureFichier fichier = new LectureFichier();
|
||||
}
|
||||
}
|
24
DEV2.1/TP13/03_Questionnaire/java.quiz
Normal file
24
DEV2.1/TP13/03_Questionnaire/java.quiz
Normal file
@@ -0,0 +1,24 @@
|
||||
Quel mot-clé représente la réalisation d'une interface ?
|
||||
-extends
|
||||
-implements
|
||||
-throws
|
||||
Quel type primitif est stocké sur 16 bits ?
|
||||
-char
|
||||
-byte
|
||||
-float
|
||||
Quel qualificatif représente un membre de classe ?
|
||||
-final
|
||||
-protected
|
||||
-static
|
||||
Vers quel type primitif peut-on convertir implicitement un long ?
|
||||
-float
|
||||
-boolean
|
||||
-int
|
||||
Quel mot-clé qualifie une classe qui ne définit pas complètement ses méthodes ?
|
||||
-private
|
||||
-static
|
||||
-abstract
|
||||
Quelle peut être la classe apparente d'un objet encapsulant la valeur 0.1 ?
|
||||
-Byte
|
||||
-Number
|
||||
-Short
|
Reference in New Issue
Block a user