Examples of Cinema


Examples of Sercultur.classes.Cinema

                    for( int j = 0; j < rowsExibicao.getLength(); j++ ){

                        Element c = (Element)rowsExibicao.item(j);

                        listCinemas.add(new Cinema(
                                                getTagText(c, "Cinema"),
                                                getTagText(c, "Morada"),
                                                getTagText(c, "NumeroConcelho"),
                                                getTagText(c, "NumeroDistrito"),
                                                getTagText(c, "Horario"),
View Full Code Here

Examples of com.packtpub.java7.concurrency.chapter2.recipe2.task.Cinema

   * Main method of the example
   * @param args
   */
  public static void main(String[] args) {
    // Creates a Cinema
    Cinema cinema=new Cinema();
   
    // Creates a TicketOffice1 and a Thread to run it
    TicketOffice1 ticketOffice1=new TicketOffice1(cinema);
    Thread thread1=new Thread(ticketOffice1,"TicketOffice1");

    // Creates a TicketOffice2 and a Thread to run it
    TicketOffice2 ticketOffice2=new TicketOffice2(cinema);
    Thread thread2=new Thread(ticketOffice2,"TicketOffice2");
   
    // Starts the threads
    thread1.start();
    thread2.start();
   
    try {
      // Waits for the finalization of the threads
      thread1.join();
      thread2.join();
    } catch (InterruptedException e) {
      e.printStackTrace();
    }

    // Print the vacancies in the cinemas
    System.out.printf("Room 1 Vacancies: %d\n",cinema.getVacanciesCinema1());
    System.out.printf("Room 2 Vacancies: %d\n",cinema.getVacanciesCinema2());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.