Search:

Type: Posts; User: koder632417

Search: Search took 0.11 seconds.

  1. Re: Help me with my code for a project? Not sure how to fix the errors.

    They are already connected!

    Look in the DogDriver class and you will see it creates a DogTrack and calls on its constructor and method playgame():



    DogTrack d = new DogTrack(trackSize); ...
  2. Re: Help me with my code for a project? Not sure how to fix the errors.

    We are all still learning. No worries!

    So is it SOLVED, or were you still having issues?
  3. Re: errror constructor class cannot be applied to give types

    I second what Greg said. Check out the link that he posted. The first page alone should give you enough information on how you need to define your constructor.

    A constructor looks like a method,...
  4. Re: errror constructor class cannot be applied to give types

    If you look inside your customer class you will see a comment:

    // Add constructor, get, set, as needed.

    So it looks like you are supposed to write code here. The error exists because the code...
  5. Replies
    9
    Views
    938

    Re: how do I test my code on a tablet?

    I have an iPhone and use an app called JVM....something something. All I know is it starts with JVM. Maybe you can search for JVM instead?
  6. Replies
    9
    Views
    938

    Re: how do I test my code on a tablet?

    I would think that the app you are using would allow you to run (test) your code.


    If not there are definitely apps out there for compiling and running java, however, they aren't as robust as...
  7. Re: Help me with my code for a project? Not sure how to fix the errors.

    Your dogTrack class does not know of the main classes trackSize variable, meaning it is out of scope as Greg had said.
    So, yes you have to declare the variable inside the dogTrack class.

    The...
  8. Replies
    3
    Views
    748

    Re: If statements-printing messages

    Okay few things I noticed,

    pay close attention to your brackets {}

    you will never reach this statement


    if (count>10)
    because it is inside of
  9. Replies
    27
    Views
    2,143

    Re: Splitting up array's:

    arr[] refers to an array.

    arr[i] refers to the element at index i in arr[],
    so if arr[] were a String array, arr[i] would be referring to a String
  10. Replies
    1
    Views
    1,073

    Re: Snake GUI Logic

    Could you explain what the problem is? What is the expected result and what result are you getting?
  11. Re: Help me with my code for a project? Not sure how to fix the errors.

    A few things I noticed to get rid of some of the errors:

    In your class DogTrack, you have a method called "playGame()". In that method you call other methods inside the DogTrack class.

    If you...
  12. Replies
    8
    Views
    1,033

    Re: What is wrong with my code?

    There is no need to use two parameters in the method because they are both doing the same thing and don't interact. Just use one and call it twice.


    public BigInteger CalculateKey(BigInteger...
  13. Replies
    8
    Views
    1,033

    Re: What is wrong with my code?

    It doesn't compile because you have two parameters but dont tell the compiler what type they are.

    public BigInteger CalculateKey(userA, userB) {

    You need to tell the compiler what type userA...
  14. Re: I'm a beginner and i'm searching for a basic example

    Come up with some sort of class you want to use. Maybe an Animal.
    Then try to figure out how you can relate those terms to the program.
    You could have a Fish class that extends the Animal class....
  15. Replies
    27
    Views
    2,143

    Re: Splitting up array's:

    Couldn't you just create an array for each player, then iterate throught the main array, alternating between the player arrays and assigning them hands?
  16. Replies
    2
    Views
    887

    Re: Where should I start

    What do you have so far? Can you post what you have coded already?
  17. Replies
    9
    Views
    1,222

    [SOLVED] Re: SoftwareSales Program

    Sometimes the best thing to do is take a break, but it can be difficult to do when you know the answer is going to be something so simple!
  18. Replies
    9
    Views
    1,222

    [SOLVED] Re: SoftwareSales Program

    No problem. Glad I could help.


    Just a tip: This was a little difficult to understand because calculations are happening in different places (which is why I was confused about the first part)...
  19. Replies
    9
    Views
    1,222

    [SOLVED] Re: SoftwareSales Program

    Actually, at 100 it should be 50% off right? which would make that correct..

    --- Update ---

    But for others it is wrong, so you are right, you do want to go back and return discount for...
  20. Replies
    9
    Views
    1,222

    [SOLVED] Re: SoftwareSales Program

    And it seems that your getCost method should look more like:



    cost = costBeforeDiscount - discount;
    return cost;
  21. Replies
    9
    Views
    1,222

    [SOLVED] Re: SoftwareSales Program

    So what exactly is the problem? I am not sure exactly what it is supposed to do so I can't tell what is wrong.

    --- Update ---

    I noticed your getDiscount method returns the variable discount,...
  22. Replies
    3
    Views
    767

    Re: For loop error

    You have an extra "=" in the for loop. Should be "!=" not "!=="


    Here is the Java Docs for Operators: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html
Results 1 to 22 of 22