Skip to content
Snippets Groups Projects
Commit aa695e0f authored by SAEZ Theo's avatar SAEZ Theo
Browse files

Mise à jour du constructeur MatrixGrayImage et des méthodes getHeight et getWidth

parent 96f901bb
No related branches found
No related tags found
No related merge requests found
......@@ -32,23 +32,18 @@ public class MatrixGrayImage implements GrayImage {
@Override
public int getWidth() {
// TODO : Changer les instructions pour retourner la largeur de l'image.
return 600;
return this.width;
}
@Override
public int getHeight() {
// TODO : Changer les instructions pour retourner la hauteur de l'image.
return 400;
return this.height;
}
public MatrixGrayImage(int width, int height){
/* TODO : Modifier les instructions pour initialiser correctement
les propriétés de l'instance.
*/
this.width = 0;
this.height = 0;
this.pixels = null;
this.width = width;
this.height = height;
this.pixels = new GrayColor[this.width][this.height];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment