Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    16
    Views
    2,861

    Re: How can i improve this code?

    Move it to before where you call the constructor.
    That would be inside of some method
  2. Replies
    16
    Views
    2,861

    Re: How can i improve this code?

    Why is that I/O code in the Person class?
  3. Replies
    16
    Views
    2,861

    Re: How can i improve this code?

    Move it to before where you call the constructor with the data that you read in.

    When you change your app to use GUI, you won't have to change anything in the Person class. The data needed by the...
  4. Replies
    16
    Views
    2,861

    Re: How can i improve this code?

    Remove all user I/O code from the constructor. Get the values and use them in the constructor to pass them to the class.

    pseudo code:
    Get <the data for the class> from the user
    TheClass...
  5. Replies
    16
    Views
    2,861

    Re: How can i improve this code?

    Something like that.
    You are connecting the creation of the Person object to the presence of a console input. When you move to a GUI program then the constructor will have to be changed. Remove the...
  6. Replies
    16
    Views
    2,861

    Re: How can i improve this code?

    That message says the the class file was created by java version 1.7 and the java program is an older version (not 1.7)

    Does your IDE use a different version of java than available to the command...
  7. Replies
    16
    Views
    2,861

    Re: How can i improve this code?

    Can you copy and post the full text of the error message.
    To copy the contents of the command prompt window:
    Click on Icon in upper left corner
    Select Edit
    Select 'Select All' - The selection...
Results 1 to 7 of 7