User Tools

Site Tools


guess_my_rule

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
guess_my_rule [2022/08/03 13:04] – [Guess My String Rule] frchrisguess_my_rule [2022/08/11 10:02] frchris
Line 55: Line 55:
  public GuessMyStringRule()  public GuessMyStringRule()
  {  {
- secretRule = "The String needed to contain a lower case s";+ // Change the following to make your own rule and hint: 
 + 
 +                secretRule = "The String needed to contain a lower case s";
  hint = "Ben follows the rule, but bend does not";  hint = "Ben follows the rule, but bend does not";
   
Line 96: Line 98:
  return secretRule;  return secretRule;
  }  }
 +        /**
 +        /* change the following to determine if your rule is followed
 +        */
  public boolean isCorrect(String guess) {  public boolean isCorrect(String guess) {
  if (guess.indexOf('s') < 0)  if (guess.indexOf('s') < 0)
guess_my_rule.txt · Last modified: 2022/08/11 10:09 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki