Class DollarAndTicket

java.lang.Object
org.jacop.examples.fd.ExampleFD
org.jacop.examples.fd.DollarAndTicket

public class DollarAndTicket extends ExampleFD
It solves a simple logic puzzle - Dollar and Ticket problem.
Version:
4.9

Every year the Soccer Club has a raffle to support the cost of playing fields, equipment, and camps. This year the top five sellers were three girls named Diane, Jenny, and Maggie, and two boys named Greg and Kevin; last names are Borecki, Ott, Panos, Ruiz, and Vogel. Each of them is on a different team (the Bobcats, Cheetahs, Kickers, Stars, and Wolves), and each sold a different number of books of tickets (20, 18, 12, 10, and 6). Can you match each seller's full name with his or her team and number of ticket books sold?

1. Jenny sold exactly twice as many books as Ms. Ruiz. 2. The one who sold 12 books (who isn't Panos) isn't on the Bobcats or Stars. 3. The player from the Wolves sold at least twice as many books as Ott. 4. Borecki isn't on the Kickers. 5. The girl on the Cheetahs sold exactly three times as many books as Diane. 6. Greg isn't Borecki or Ott. 7. Kevin isn't on the Bobcats.

  • Constructor Details

    • DollarAndTicket

      public DollarAndTicket()
  • Method Details

    • model

      public void model()
      Description copied from class: ExampleFD
      It specifies a standard way of modeling the problem.
      Specified by:
      model in class ExampleFD
    • main

      public static void main(String[] args)
      It executes the program to solve this simple puzzle.
      Parameters:
      args - no argument is used.