Show Table of Contents
26.3. Number Guess Example: Classes and Methods
Note
The Number Guess Example classes are all contained within the
NumberGuessExample.java file.
- Class
GameRulesprovides the maximum range and the number of guesses allowed. - Class
RandomNumberautomatically generates a number between 0 and 100 and makes it available to the rules. It does so by insertion via thegetValue()method. - Class
Gamekeeps track of the number of guesses made. - To start the process, the
startProcess()method is called. - To execute the rules, the
fireAllRules()method is called. - To clear the Working Memory session, the
dispose()method is called.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.