Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    16
    Views
    2,666

    Re: java ceaser cipher stanford lectures

    I'm not sure I understand what you are asking.
    You can give just about any name you want to the parameters received by a method:
    private String encrypt(String theWordToWorkOn, int...
  2. Replies
    16
    Views
    2,666

    Re: java ceaser cipher stanford lectures

    Do you see how the algorithm works? The original input is encrypted and then decrypted back to the original input.
  3. Replies
    16
    Views
    2,666

    Re: java ceaser cipher stanford lectures

    Look at the output.
    Do you see any relationship between the output of these two lines of code and the input to the program?
  4. Replies
    16
    Views
    2,666

    Re: java ceaser cipher stanford lectures

    What did you want the Caesar class to do for you?
    Did it have a method that would do that?

    Yes, that can work for this specific very small example.
    When your programs get larger and when there...
  5. Replies
    16
    Views
    2,666

    Re: java ceaser cipher stanford lectures

    The fix to your program is to add a call to nextLine() to read the empty line BEFORE you ask for the word.
  6. Replies
    16
    Views
    2,666

    Re: java ceaser cipher stanford lectures

    Your problem is with the way the Scanner class works. The nextInt() method reads the next word as a number from the input and leaves the endline from Enter in Scanner's buffer. The nextLine() call...
  7. Replies
    16
    Views
    2,666

    Re: java ceaser cipher stanford lectures

    Why isn't there a word to encode entered? Your posted console contents does not show a word being entered.
    If nothing goes in, then I would think that nothing would come out.
    Try it and enter a...
  8. Replies
    16
    Views
    2,666

    Re: java ceaser cipher stanford lectures

    Can you explain? Show what the code does print out and also show what you think it should output.
Results 1 to 8 of 8