Skip to content
Snippets Groups Projects
Commit e5dbebbe authored by BENHILA Douaa's avatar BENHILA Douaa
Browse files

add method pointsCount

parent 4a1dc6f5
No related branches found
No related tags found
No related merge requests found
......@@ -9,9 +9,12 @@ public abstract class AbstractShape implements Shape {
private List<Point2D> points = new ArrayList<>();
public void addPoints(Point2D... points){//Point2D... refere a plusieurs points
for(Point2D point:points) {
for(Point2D point:points) { // utilise la boucle vu que je dois ajouter tous les points
this.points.add(point); //this.points refere a la liste
}
}
public int pointsCount(){ //nombre total de points
return points.size();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment