Search:

Type: Posts; User: jps

Search: Search took 0.11 seconds.

  1. Replies
    8
    Views
    1,512

    Re: how to loop a method?

    I would think that method could be as simple as:

    public void addTicket() {
    numTickets++;
    }...where the method does exactly one thing. Raise the number of tickets by one. Methods are not...
  2. Replies
    8
    Views
    1,512

    Re: how to loop a method?

    I'm not too sure about this section of code, for the following reasons.
    1) this method returns a boolean. This method adds a ticket to the ticket count. I don't understand what the return boolean...
  3. Replies
    8
    Views
    1,512

    Re: how to loop a method?

    Any time you have repeated code, you have missed the opportunity to make a method which can be reused.
  4. Replies
    8
    Views
    1,512

    Re: how to loop a method?

    When does this return false?
  5. Replies
    8
    Views
    1,512

    Re: how to loop a method?

    When does this return true?
Results 1 to 5 of 5