hypesystem

[C1] - Algorithm outlined

Nov 4th, 2011
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.90 KB | None | 0 0
  1. package cinemabooking;
  2.  
  3. import java.util.ArrayList;
  4.  
  5. /**
  6.  * Description of the algorithm goes here
  7.  * @author hypesystem
  8.  */
  9. public class BookFartAlgorithm implements Algorithm {
  10.     private ArrayList<Seat> alg_selected;
  11.    
  12.     public BookFartAlgorithm() {
  13.         alg_selected = new ArrayList<Seat>();
  14.     }
  15.    
  16.     @Override
  17.     public ArrayList<Seat> autoSelect(ArrayList<ArrayList<Seat>> seats, int number_of_seats) {
  18.         clear();
  19.         /*
  20.          * ... algorithm content goes here ...
  21.          */
  22.         return alg_selected;
  23.     }
  24.    
  25.     @Override
  26.     public ArrayList<Seat> seatClicked(ArrayList<ArrayList<Seat>> seats, int x, int y, int number_of_seats) {
  27.         clear();
  28.         /*
  29.          * ... algorithm content goes here ...
  30.          */
  31.         return alg_selected;
  32.     }
  33.    
  34.     private void clear() {
  35.         alg_selected = new ArrayList<Seat>();
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment