SHARE
TWEET

Untitled

a guest Nov 19th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ee.ttu.algoritmid.dancers;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.List;
  5.  
  6. import static ee.ttu.algoritmid.dancers.Dancer.Gender.FEMALE;
  7. import static ee.ttu.algoritmid.dancers.Dancer.Gender.MALE;
  8.  
  9.  
  10. public class Test {
  11.     public static void main(String[] args) {
  12.         HW01 hw = new HW01();
  13.  
  14.         List<Dancer> test = new ArrayList<>();
  15.         Dancer m = new Dancer("n", 44, FEMALE);
  16.         Dancer m1 = new Dancer("n1", 47, FEMALE);
  17.         Dancer m2 = new Dancer("n1", 43, FEMALE);
  18.         Dancer m3 = new Dancer("n1", 45, FEMALE);
  19.  
  20.         Dancer v = new Dancer("n1", 47, MALE);
  21.         Dancer v1 = new Dancer("n1", 50, MALE);
  22.         Dancer v2 = new Dancer("n1", 52, MALE);
  23.         Dancer v3 = new Dancer("n1", 50, MALE);
  24.         Dancer v4 = new Dancer("n1", 50, MALE);
  25.  
  26.         test.add(m);
  27.         test.add(m1);
  28.         test.add(m2);
  29.         test.add(m3);
  30.         test.add(v);
  31.  
  32.         for (Dancer d : test) {
  33.             hw.findPartnerFor(d);
  34.         }
  35.  
  36.  
  37.         hw.returnWaitingList();
  38.  
  39.         hw.findPartnerFor(v1);
  40.         hw.returnWaitingList();
  41.  
  42.  
  43.         hw.findPartnerFor(v2);
  44.         hw.returnWaitingList();
  45.  
  46.         hw.findPartnerFor(v3);
  47.         hw.returnWaitingList();
  48.  
  49.         hw.findPartnerFor(v4);
  50.         System.out.println(hw.returnWaitingList());
  51.     }
  52. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top