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

add method add points

parent 0be028ec
No related branches found
No related tags found
No related merge requests found
package shape;
public class AbstractShape {
import javafx.geometry.Point2D;
import java.util.ArrayList;
import java.util.List;
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) {
this.points.add(point); //this.points refere a la liste
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment