Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. import java.util.ArrayList;
  2. import java.util.List;
  3. import java.util.Random;
  4.  
  5. public class Main {
  6.  
  7. public static int random (int min, int max) {
  8.  
  9. Random rand = new Random();
  10.  
  11. int randomNum = rand.nextInt((max - min) + 1) + min;
  12.  
  13. return (randomNum);
  14. }
  15.  
  16.  
  17. public static void main(String[] args) {
  18. //yl1();
  19. yl2lalk();
  20. //yl2kimp();
  21. //yl3kimpSort();
  22. //ise1otsimiseEfektiivsus();
  23. //ise2sortimisVõrdlus();
  24. }
  25.  
  26. public static void yl1() {
  27. }
  28.  
  29. public static void yl2lalk() {
  30. Andmebaas andmebaas = new LALKAndmebaas(100);
  31. Andmebaas andmebaas2 = new KimbuAndmebaas(1000);
  32.  
  33.  
  34. List<Isik> link = new ArrayList<>();
  35.  
  36. for (int i = 0; i <100 ; i++) {
  37. link.add(new Isik(random(1 , 100), "Trevor", random(1,100)));
  38. }
  39. for (int i = 0; i <100 ; i++) {
  40. andmebaas.LisaIsik(link.get(i));
  41. andmebaas2.LisaIsik(link.get(i));
  42.  
  43. }
  44.  
  45.  
  46. System.out.println("kek");
  47. //System.out.println(andmebaas.LeiaIsik(random(1,100)));
  48. System.out.println(andmebaas2.LeiaIsik(random(1,1000)));
  49.  
  50.  
  51.  
  52.  
  53.  
  54. System.out.println(andmebaas);
  55. //System.out.println(andmebaas2);
  56.  
  57. }
  58.  
  59.  
  60. public static void yl2kimp() {
  61.  
  62. }
  63.  
  64. public static void yl3kimpSort() {
  65.  
  66. }
  67.  
  68. public static void ise1otsimiseEfektiivsus() {
  69.  
  70. }
  71.  
  72. public static void ise2sortimisVõrdlus() {
  73.  
  74. }
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement