[CSC 204]assignment 5 prper nouns

Andrew J. Pounds pounds at theochem.mercer.edu
Sun Apr 25 17:54:44 EDT 2010


On 04/25/2010 04:51 PM,  wrote:
> Dr. Pounds,
>
> The proper noun method is killing me.
>
> Any ideas.
>
>    
One technique is to maintain a boolean variable in your word object ( I 
am assuming that you are using an object to hold the information about 
your word.  The boolean might be called something like properNoun.   If 
the first time you read the word the first letter is capitalized, then 
set the boolean named "properNoun" to true -- otherwise set it to 
false.  If you EVER see the word again and the first letter is not 
capitalized, then set the variable to false.   This will guarantee that 
if the word, or the first letter of the word,  is ALWAYS capitalized, 
then you have stored a proper noun.

Make sense?

-- 
Andrew J. Pounds, Ph.D.  (pounds at theochem.mercer.edu)
Associate Professor of Chemistry and Computer Science
Mercer University,  Macon, GA 31207   (478) 301-5627



More information about the csc204 mailing list