Search:

Type: Posts; User: JBtheIV

Search: Search took 0.38 seconds.

  1. Replies
    24
    Views
    1,548

    Re: Working with loops for the first time.

    Sorry to sound like a pain but thats the problem I'm having. I honestly have no idea how to move on.
  2. Replies
    24
    Views
    1,548

    Re: Working with loops for the first time.

    The while loop asks the user to enter a number for a product. Until they enter the integer 10 (the sentinel), it will keep asking them for a product number.

    ex.
    Please select an item from the...
  3. Replies
    24
    Views
    1,548

    Re: Working with loops for the first time.

    /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    */
    package orderfrommenu;

    import java.util.Scanner;

    /**
    *
  4. Replies
    24
    Views
    1,548

    Re: Working with loops for the first time.

    @javaiscool. Thanks man, I think I'm on to something.

    I imported the code:


    if (nNumber == 1){
    nSum += GPOD_SHUFFLE;
    }
    else if (nNumber == 2){
    nSum...
  5. Replies
    24
    Views
    1,548

    Re: Working with loops for the first time.

    Sorry if I wasn't clear, but our Teacher hasn't taught us about array's yet. Therefore we should be required to figure this out without them.
    Thus, thats why I need to figure out the right...
  6. Replies
    24
    Views
    1,548

    Re: Working with loops for the first time.

    Thanks for the response. Our professor hasn't taught us about arrays so thats why it looks foreign to me.


    /*
    * To change this template, choose Tools | Templates
    * and open the template in...
  7. Replies
    24
    Views
    1,548

    Re: Working with loops for the first time.

    I don't know how to use arrays, or at the least, can't remember. Can you give an example?
  8. Replies
    24
    Views
    1,548

    Re: Working with loops for the first time.

    Ok update!
    I redid my coding and was able to fix the problem.



    /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    */
    package orderfrommenu;
  9. Replies
    24
    Views
    1,548

    Re: Working with loops for the first time.

    The customer can purchase as many items as they want. Each item corresponding to a number (1-9). The system will ask the user to enter another item until the user inputs 10. Then the total items...
  10. Replies
    24
    Views
    1,548

    Working with loops for the first time.

    Hello.

    So far, I am in my 3rd week of Java programming and I've finally run into a bit of a problem. We were given an assignment of the following:
    Scenario 1: Customer purchases all 9 items...
Results 1 to 10 of 10