Search:

Type: Posts; User: iDizzle

Page 1 of 2 1 2

Search: Search took 0.18 seconds.

  1. Replies
    4
    Views
    3,926

    Re: Need some help with my Roulette game please.

    OOhh okay. That makes sense. Thank you! I will work at it.
  2. Replies
    4
    Views
    3,926

    Re: Need some help with my Roulette game please.

    Ok Thank you. For Step 7 I believe the output should be cleared up later on in the instructions since there are 12 steps to the assignment. If not than I will create a "get" method.

    So for Step 8...
  3. Replies
    4
    Views
    3,926

    Need some help with my Roulette game please.

    Hi everyone, I'm working on a roulette game and am a pretty confused. I have a sheet with instructions on what to do with 2 classes and the main program which were provided in 3 files. I'm stuck on...
  4. Replies
    12
    Views
    1,978

    [SOLVED] Re: Question about using the toString method.

    Than how can I reference the toString?
  5. Replies
    12
    Views
    1,978

    [SOLVED] Re: Question about using the toString method.

    Nope. No errors in the class itself or the toString method. I only get an error when I try to use System.out.println(faceName); or System.out.println(face); or however else I try to call the toString.
  6. Replies
    12
    Views
    1,978

    [SOLVED] Re: Question about using the toString method.

    public String toString()
    {
    String faceName;
    if (face == HEADS)
    faceName = "Heads";
    else
    faceName = "Tails";
    return faceName;
    }
    }
  7. Replies
    12
    Views
    1,978

    [SOLVED] Re: Question about using the toString method.

    Thanks for chiming in Norm. When I try "System.out.println(faceName);" the compiler still says that "faceName cannot be resolved to a variable".
  8. Replies
    12
    Views
    1,978

    [SOLVED] Re: Question about using the toString method.

    So based on the first code above(the Coin class), would I do something like "System.out.println(faceName);" ? Or how would I get the program to return the value in the toString method in the Coin...
  9. Replies
    12
    Views
    1,978

    [SOLVED] Question about using the toString method.

    Hi everyone. I'm writing a program that is using a class called Coin.java, that flips a coin. The program is supposed to find the longest run of Heads in 100 flips of the coin. I'm having trouble...
  10. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    Will do, thank you! Yeah because I did not know where the problem was coming from. As long as I know its a syntax error than I know where to being. Thanks again! I'll see how it works out afterwards.
  11. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    Sorry, this is all just so confusing to me. My text book is very vague about this. I understand the concept of creating and using a class but I'm just having trouble putting it into use. Thanks for...
  12. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    As far as I know, these are the error messages that it's giving me. These error messages are from the boosterSales program that I'm trying to use the bandBooster class methods and variables from. No...
  13. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    ohh ok. Well, both of the files are in the same folder. They are both in the "bin" folder and both in the "src" folder.
  14. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    So I guess my question is, in order to use the methods and variables from a class(bandBooster) that I've created, in the new program(boosterSales) do I have to open both files at the same time? Or do...
  15. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    Sorry, how do I use the java command? I'm a beginner =[
  16. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    My compiler has little "x"s at the beginning of the line to annotate errors and for example, line 6 says;
    ----------------------------------------------------------------------
    Joe cannot be...
  17. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    This is the error that I get.

    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
    name cannot be resolved to a type
    name cannot be resolved to a type
    Duplicate...
  18. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    This is the error that I get.

    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
    name cannot be resolved to a type
    name cannot be resolved to a type
    Duplicate...
  19. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    Hi guys. So I updated the first post with more of what I'm trying to do. For an assignment I need to create a class and write another program using methods from that class. When I try to use them...
  20. [SOLVED] Re: Help with my Java program: Applet that draws 5 random circles.

    Pb, by his (a) being in the wrong place do you mean that his int variables should be declared at the very beginning of the main? Pb, you know that I am no java expert but it does look odd to me....
  21. [SOLVED] Re: Help with my Java program: Applet that draws 5 random circles.

    Hi pb. Do you mean if you drag the window and resize it, it will recreate the random circles? Because it does do that.
  22. [SOLVED] Re: Help with my Java program: Applet that draws 5 random circles.

    Hmmm. It's possible. I wouldn't know though, sorry =/. I use Eclipse to run this stuff.
  23. [SOLVED] Re: Help with my Java program: Applet that draws 5 random circles.

    Hmmm. Take a look at my code above and see if you can make anything out of it.
  24. [SOLVED] Re: Help with my Java program: Applet that draws 5 random circles.

    Sorry, this may not be much help since I am still a beginner but where are you int declarations for startX,Y and circleRad? Other than that, I only see one instance of a circle being drawn so I'm not...
  25. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    Ah, thank you! That looks much better. So to add a main I would add it below all of that code above? What did you mean by the main() will create an instance of the class? Sorry, I'm a beginner...
Results 1 to 25 of 46
Page 1 of 2 1 2