project0
Class CharGenerator

java.lang.Object
  |
  +--project0.CharGenerator

public class CharGenerator
extends java.lang.Object

Methods related to generating and testing characters, for the Diety of Luck project. Valid characters for this application are the 26 standard uppercase characters used in English. Note: there are standard Java library methods with signatures like boolean isUpperCase(char) Before using them, check carefully to see if their idea of "upper case" is the same as the one used in this project.

Author:
dickey 143-03wi

Constructor Summary
CharGenerator()
          Creates a new instance of CharGenerator.
 
Method Summary
static boolean isEnglishUpperCase(char c)
          Test if the character is a valid uppercase letter of English.
static char randomUpperChar()
          Generate a random charachter, drawn from the internally known set of upper case characters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharGenerator

public CharGenerator()
Creates a new instance of CharGenerator. Checks that the internal table of upper case letters is plausible.

Method Detail

isEnglishUpperCase

public static boolean isEnglishUpperCase(char c)
Test if the character is a valid uppercase letter of English.

Returns:
true iff the character is valid, i.e., in the range A to Z.

randomUpperChar

public static char randomUpperChar()
Generate a random charachter, drawn from the internally known set of upper case characters.

Returns:
a character in the range A to Z.