Search:

Type: Posts; User: dx8292

Search: Search took 0.07 seconds.

  1. Replies
    2
    Views
    1,435

    Re: Stacks (evaluating postfix expression)

    So I guess 36 is right, thanks
  2. Replies
    2
    Views
    1,435

    Stacks (evaluating postfix expression)

    I'm a little confused so if someone can confirm if I am doing that would be great.

    Evaluate postfix expression:

    1 2 + 4 * 5 6 * 10 / 8 * +

    Me evaluating:

    1) 1
    2) 2 1
  3. Replies
    10
    Views
    1,329

    Re: Please help, simple IF/ELSE decison question.

    jps i don't know if he has gotten as far as .equals and toUpperCase methods yet, just cause it looks like a basic if/else chapter in some book

    and IronRyan I forgot something in discount =...
  4. Replies
    2
    Views
    1,666

    Re: Combination Lock Class help

    It's at this line in test:

    object1.Turn(turn1,straight1,combo1,turn2,straight2,combo2,turn3,straight3,combo3);
    ...
  5. Replies
    4
    Views
    1,205

    Re: Java Class EASY Assignment

    printMultiples(n); //in the main....I think
  6. Replies
    10
    Views
    1,329

    Re: Please help, simple IF/ELSE decison question.

    if (totalPrice >= 50)
    {
    System.out.println("Apply 10% discount (y/n)?");
    discount = (in.nextLine());
    if (discount=="n")
    {
    System.out.println(" ");
    }
    }
  7. Replies
    4
    Views
    1,468

    Re: My Class assignment help

    Your coding is a little hard to read.... I see your constructor and accessor methods, but where are you mutator methods?
    this makes no sense:
    public double qScore () {
    return (double)...
  8. Replies
    2
    Views
    1,666

    Combination Lock Class help

    done.................................close it plz
  9. Thread: Sorting/Search

    by dx8292
    Replies
    7
    Views
    2,149

    Re: Sorting/Search

    (1+11)/2=6
    (1+5)/2=3
    (4+5)/2=4.5 round to 5

    I got three.
  10. Thread: Sorting/Search

    by dx8292
    Replies
    7
    Views
    2,149

    Re: Sorting/Search

    What do mean? I want to see how many comparisons it would take to find 45. The first comparison would be to 45 and the midpoint number (58)
    Then the rest of the comparisons would be to each element...
  11. Thread: Sorting/Search

    by dx8292
    Replies
    7
    Views
    2,149

    Re: Sorting/Search

    The thing Binary Search I wasn't really sure was when it checks the middle number and if it's not value that was being searched for, does it start searching in reverse order if the first half needs...
  12. Thread: Sorting/Search

    by dx8292
    Replies
    7
    Views
    2,149

    Sorting/Search

    Wanted to check if I was doing this correctly.

    Binary Search: Find number of comparisons needed

    5 11 18 40 45 58 62 75 88 95 100

    A. 45 --> 3 needed
    B. 96 --> 3 needed
  13. Replies
    7
    Views
    1,990

    Re: Arrays/Looping probelm?

    FINALLY GOT IT.....took me half the day for something so ridiculously easy, but I GOT IT.

    Just took out the average method and put the code directly into the main method and did total/count.
    ...
  14. Replies
    7
    Views
    1,990

    Re: Arrays/Looping probelm?

    This does seem less complicated, but I think am supposed to stick with arrays. From what I have looked up ArrayList "is similar to Arrays," which means I can't use it with an array, unless I'm...
  15. Replies
    7
    Views
    1,990

    Re: Arrays/Looping probelm?

    I'm not too familiar with ArrayList.

    Can you use ArrayList with the Scanner and Array?

    array.size() or numinput.size() //like I said, not too familiar with it
  16. Replies
    10
    Views
    6,246

    Re: Sum of even and odd integers

    stick with scanner instead of joptionpane

    for(int i=0;i<=what ever number;i++)
    {
    new keyboard=new Scanner(System.in);

    System.out.print("Enter a number: ");
    enternumber=keyboard.nextInt();
    ...
  17. Replies
    7
    Views
    1,990

    Arrays/Looping probelm?

    PROBLEM SOLVED....THANK YOU. I thought there was too much code just in case someone wanted to copy the entire thing, so I deleted it.
  18. Replies
    3
    Views
    1,819

    Re: Counting Matches in Parallel Arrays

    I had something different in mind, but just by looking it seems right. I'll play around with the code tomorrow cause I'm tired right now, too much coding today, but good practice. I'll post back...
  19. Replies
    3
    Views
    1,819

    Counting Matches in Parallel Arrays

    I want to make a method involving arrays.
    Both are Integer Arrays. (And are the same size, so I don't need to check if it's the same size)
    Its needs see how many of the parallel positions matches...
  20. Thread: Hello

    by dx8292
    Replies
    1
    Views
    914

    Hello

    Hi,

    I'm to java programming, only taken one JAVA class and taking the 2nd one now.
  21. Replies
    5
    Views
    1,560

    Re: How do I loop this if statement?

    I think you need to add a for loop and how many times does it need to loop, what's the purpose of the code?

    Try putting the if/else statement between this:

    for (int i=?; i<? ;i++)
    {
    }
    ...
Results 1 to 21 of 21