Skip to content
Snippets Groups Projects
Commit ffb67674 authored by Thomas Lapp's avatar Thomas Lapp
Browse files

ajout main pour get sur structure std

parent fe485c44
No related merge requests found
package p4a;
import java.util.Random;
public class MainArrayListStdGet {
public static void main(String[] args) {
Random rnd = new Random();
ArrayListStd<Integer> arrayListStd = new ArrayListStd<Integer>();
int nbOperation = Integer.parseInt(args[0]);
for (int i = 0; i < nbOperation; i++) {
arrayListStd.ajout(0, i);
}
for (int i = 0; i < nbOperation; i++) {
arrayListStd.acces(rnd.nextInt(nbOperation));
}
}
}
package p4a;
import java.util.Random;
public class MainLinkedListStdGet {
public static void main(String[] args) {
Random rnd = new Random();
LinkedListStd<Integer> linkedListStd = new LinkedListStd<Integer>();
int nbOperation = Integer.parseInt(args[0]);
for (int i = 0; i < nbOperation; i++) {
linkedListStd.ajout(0, i);
}
for (int i = 0; i < nbOperation; i++) {
linkedListStd.acces(rnd.nextInt(nbOperation));
}
}
}
package p4a;
import java.util.Random;
public class MainTableauStdGet {
public static void main(String[] args) {
Random rnd = new Random();
int nbOperation = Integer.parseInt(args[0]);
TableauStd tabStd = new TableauStd(nbOperation);
for (int i = 0; i < nbOperation; i++) {
tabStd.ajout(0, i);
}
for (int i = 0; i < nbOperation; i++) {
tabStd.acces(rnd.nextInt(nbOperation));
}
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment