ExamplesJaCoP
Class Golf

java.lang.Object
  extended by ExamplesJaCoP.Example
      extended by ExamplesJaCoP.Golf

public class Golf
extends Example

A simple logic puzzle about golf players.

Author:
Mariusz Czarnojan, Krystian Burka, and Radoslaw Szymanek "A Round of Golf" When the Sunny Hills Country Club golf course isn't in use by club members, of course, it's open to the club's employees. Recently, Jack and three other workers at the golf course got together on their day off to play a round of eighteen holes of golf. Afterward, all four, including Mr. Green, went to the clubhouse to total their scorecards. Each man works at a different job (one is a short-order cook), and each shot a different score in the game. No one scored below 70 or above 85 strokes. From the clues below, can you discover each man's full name, job and golf score? 1. Bill, who is not the maintenance man, plays golf often and had the lowest score of the foursome. 2. Mr. Clubb, who isn't Paul, hit several balls into the woods and scored ten strokes more than the pro-shop clerk. 3. In some order, Frank and the caddy scored four and seven more strokes than Mr. Sands. 4. Mr. Carter thought his score of 78 was one of his better games, even though Frank's score was lower. 5. None of the four scored exactly 81 strokes. Solution Bill Sands Cook 71 Jack Clubb Maint 85 Paul Carter Caddy 78 Frank Green Clerk 75

Field Summary
 
Fields inherited from class ExamplesJaCoP.Example
cost, search, store, vars
 
Constructor Summary
Golf()
           
 
Method Summary
static void main(java.lang.String[] args)
          It executes a simple program to solve this logic puzzle.
 void model()
          It specifies a standard way of modeling the problem.
 
Methods inherited from class ExamplesJaCoP.Example
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Golf

public Golf()
Method Detail

model

public void model()
Description copied from class: Example
It specifies a standard way of modeling the problem.

Specified by:
model in class Example

main

public static void main(java.lang.String[] args)
It executes a simple program to solve this logic puzzle.

Parameters:
args - no arguments is used.