org.jacop.examples.fd

## Class 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.

Author:
Wojciech Swietek, Maciej Trela, and Radoslaw Szymanek

• ### Fields inherited from class org.jacop.examples.fd.ExampleFD

`cost, search, store, vars`
• ### Constructor Summary

Constructors
Constructor and Description
`DollarAndTicket()`
• ### Method Summary

All Methods
Modifier and Type Method and Description
`static void` `main(String[] args)`
It executes the program to solve this simple puzzle.
`void` `model()`
It specifies a standard way of modeling the problem.
• ### Methods inherited from class org.jacop.examples.fd.ExampleFD

`creditSearch, getSearch, getSearchVariables, getStore, printMatrix, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch`
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Constructor Detail

• #### DollarAndTicket

`public DollarAndTicket()`
• ### Method Detail

• #### 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.