Search:

Type: Posts; User: Norm

Search: Search took 0.22 seconds.

  1. Thread: Complex Numbers

    by Norm
    Replies
    18
    Views
    1,416

    [SOLVED] Re: Complex Numbers

    final is a keyword that sets a variable's definition to say the variable's value can not be changed.

    final int notToBeChanged = 123;
  2. Thread: Complex Numbers

    by Norm
    Replies
    18
    Views
    1,416

    [SOLVED] Re: Complex Numbers

    The class is not correct yet. The variables: re and im need to be final so that their values can not be changed.
  3. Thread: Complex Numbers

    by Norm
    Replies
    18
    Views
    1,416

    [SOLVED] Re: Complex Numbers

    The conversion to an immutable (unchangeable) class is a good start.
    The next step would be to make re and im final so that their values can not be changed after being set in the constructor.
    Then...
  4. Thread: Complex Numbers

    by Norm
    Replies
    18
    Views
    1,416

    [SOLVED] Re: Complex Numbers

    Can you post the new code that shows the changes you made?
    Also copy the contents of the console from when you execute the program and paste it here.


    A suggestion: Make the class immutable. ...
  5. Thread: Complex Numbers

    by Norm
    Replies
    18
    Views
    1,416

    [SOLVED] Re: Complex Numbers

    Please don't post images. The posted image is too small to read and text can not be copied from an image for including in a response.

    What is the results after you corrected the problem that Jim...
  6. Thread: Complex Numbers

    by Norm
    Replies
    18
    Views
    1,416

    [SOLVED] Re: Complex Numbers

    Can you copy the contents of the console from the program's execution and paste it here?
    Add some comments saying what is wrong and show what the desired output is.
Results 1 to 6 of 6