package main;

import java.util.Random;
import java.util.Vector;

public class StructV implements Structure {

    private Vector<Integer> struct;
    private Random r;

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

    @Override
    public void remplir(int nOcc) {
        for (int i = 0; i < nOcc; i++) {
            this.struct.add(i, 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()));
    }
}
