javaeetutorial
  1. javaeetutorial
  2. JAVAEETUTORIAL-228

guessnumber-jsf example: implementation of range differs from descriptions

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 7.0.1
    • Fix Version/s: 7.0.3
    • Component/s: None
    • Labels:
      None

      Description

      In the guessnumber-jsf example, as described by chapter 8.3, the described functionality is that Duke will pick a random number between 0 and 10, while the implementation will give a random number between 0 and 9.

      Changing code line
      randomInt = new Integer(randomGR.nextInt(10));
      to
      randomInt = new Integer(randomGR.nextInt(11));
      would make the implementation match the description.

      It is a minor issue that has no effect on what the example intends to demonstrate, but still might want to have it aligned.

        Activity

        Hide
        Kim Haase added a comment -

        Thanks for catching this. We'll make sure the language fits the implementation.

        Show
        Kim Haase added a comment - Thanks for catching this. We'll make sure the language fits the implementation.
        Hide
        Kim Haase added a comment -

        Updated guessnumber-jsf and guessnumber-cdi examples to generate a random number that includes the maximum value. Also updated the code in the jsf-facelets.fm and cdi-basicexamples.fm chapters.

        Show
        Kim Haase added a comment - Updated guessnumber-jsf and guessnumber-cdi examples to generate a random number that includes the maximum value. Also updated the code in the jsf-facelets.fm and cdi-basicexamples.fm chapters.

          People

          • Assignee:
            Kim Haase
            Reporter:
            AnnTea
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: