Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Thread: Basic Calculator

    by Norm
    Replies
    13
    Views
    4,290

    Re: Basic Calculator

    Read the OPs requirements. I answered his question without any comments.

    You should explain to the OP about OOP and why using the main() for simple programs is a bad idea.
  2. Thread: Basic Calculator

    by Norm
    Replies
    13
    Views
    4,290

    Re: Basic Calculator

    Put all your code in the main() method. Then you only define the one class that main() is in.
  3. Thread: Basic Calculator

    by Norm
    Replies
    13
    Views
    4,290

    Re: Basic Calculator

    Sure, it takes time to learn the new vocabulary and terms.
    I'm afraid you'll have to use objects if you use the Scanner or String classes.
  4. Thread: Basic Calculator

    by Norm
    Replies
    13
    Views
    4,290

    Re: Basic Calculator

    Think you are. Only if you code with primitives such as int and char can you NOT use objects.
    Many of the variables in your code refer to objects of class such as String and Scanner.
  5. Thread: Basic Calculator

    by Norm
    Replies
    13
    Views
    4,290

    Re: Basic Calculator

    What class are the readString() and readInt() methods members of?
    What is the class of the object used with them?

    Read the API doc to find the answers.
    At the top of the API docs page there is...
Results 1 to 5 of 5