CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: JeffGrigg

Search: Search took 0.02 seconds.

  1. Replies
    9
    Views
    7,054

    Re: College lab help

    You don't really need to determine if the numbers are prime.

    I would suggest, however, starting from 2, which is the first prime number.

    Also remember that a divisor might be used multiple...
  2. Re: Need a little help with printing last string...

    Your code is remarkably close to being a correct solution.

    This code prints all the matching words:



    if (i1 == 26) {
    System.out.print(" Maximum string found " + str3 );
    }
  3. Replies
    2
    Views
    2,743

    Re: simple hangman problem

    That's a pretty good attempt so far.

    You could accumulate the letters guessed so far in a String variable. Then you would want to check to see if the character 'phrase.charAt(a - 1)' is in the...
  4. Replies
    2
    Views
    2,354

    Re: Help with CashRegister class

    You have a confusion of fields in the class -- too many, and you're not clear about how each should be used.

    I think you want to call your 'recordPurchase' method, not the 'purchase' method. ...
  5. Re: Hey Friends Explain what is meant by a hash code. ???

    The JavaDoc for the method explains what the hash code MUST be:
    http://download.oracle.com/javase/6/docs/api/java/lang/Object.html#hashCode()

    Briefly, if two instances are equal, then their hash...
  6. Replies
    2
    Views
    1,377

    Re: A trigonometric plot

    P.S. "sinus curve"?
    This is the first time I've heard anyone use that word related to sin functions.

    This is a sinus: http://www.krystalplonski.com/wp-content/uploads/2011/06/nasal-cavity.jpg
    ...
  7. Replies
    2
    Views
    1,377

    Re: A trigonometric plot

    It seems to "work" in some sense.

    Hard to tell without having a more clear idea of what you are trying to accomplish.

    But this expression doesn't look exactly right to me: scale * (width +...
  8. Thread: Array code

    by JeffGrigg
    Replies
    3
    Views
    1,029

    Re: Array code

    Looks like it "works" in some sense: It compiles. It runs. It produces a result.

    Looks like about half the time it populates the very first array element with the value one. And that's about...
  9. Replies
    31
    Views
    5,839

    Re: classInstanceInitalization

    The quickest easiest way to fix the last remaining compile problem is to add "return null;" as the last line in the method. This will fix the "This method must return a result of type Product"...
  10. Replies
    31
    Views
    5,839

    Re: classInstanceInitalization

    You forgot the 't' in "ex.printStackTrace();".
Results 1 to 10 of 10





Click Here to Expand Forum to Full Width

Featured