package main;

import java.util.ArrayList;
import java.util.Random;

public class StructAL implements Structure {

    private ArrayList<Integer> struct;
    private Random r;

    public StructAL() {
        this.struct = new ArrayList<>();
        this.r = new Random(69420);
    }

    @Override
    public void remplir(int nOcc) {
        for (int i = 0; i < nOcc; i++) {
            this.struct.add(r.nextInt(nOcc + 1));
        }
    }

    @Override
    public void supprimer() {
            this.struct.remove(r.nextInt(struct.size()));
    }

    @Override
    public void acceder() {
        Integer val = this.struct.get(r.nextInt(struct.size()));
    }
}
