Search:

Type: Posts; User: Hazmat210

Search: Search took 0.32 seconds.

  1. Replies
    16
    Views
    643

    [SOLVED] Re: Confused without a teacher on a loop.

    Thank you Norm for your help I finally figured it out I just had to take the public off of the total class and add it to the coin class java document. I've cleaned it up some and posting it below....
  2. Replies
    16
    Views
    643

    [SOLVED] Re: Confused without a teacher on a loop.

    OK, so I ended up creating a new class to hold the value of the balance and to do the summation of the balance at the end of each round and also ended up changing up all doubles to int. So my new...
  3. Replies
    16
    Views
    643

    [SOLVED] Re: Confused without a teacher on a loop.

    So this is what it spit out after putting in that bit of code:
    max=.4 after 501
  4. Replies
    16
    Views
    643

    [SOLVED] Re: Confused without a teacher on a loop.

    Will do as soon as soon as I get out of work @ 6 and post results thank you for your help I was thinking of creating a seperate object in the coin class to store value of each loop and use that in...
  5. Replies
    16
    Views
    643

    [SOLVED] Do {}while(balance4 >=1) loops once println of...

    Do {}while(balance4 >=1) loops once println of balance4 .15
    Do {}while(balance4 <=1) infinite loop each println showed a balance4 of less than .4
    I know this problem lies with balance4 field and...
  6. Replies
    16
    Views
    643

    [SOLVED] In the infinite loop the balance4 displays the...

    In the infinite loop the balance4 displays the rounds winnings so each round the max value of balance is .4 which should make it loop but it doesn't. I tried going back and changing all doubles to...
  7. Replies
    16
    Views
    643

    [SOLVED] I don't know how this is why I get confused. When...

    I don't know how this is why I get confused. When I run it the way the statement is now program loops once if I switch it it goes into infinite loop that is what leads me to believe that my problem...
  8. Replies
    16
    Views
    643

    [SOLVED] The balance 4 is initially zero then once the...

    The balance 4 is initially zero then once the loop has completed once it will equal at the most .4 depending on coins face after toss. My condition is wrong I want it to run until balance4 is equal...
  9. Replies
    16
    Views
    643

    [SOLVED] Confused without a teacher on a loop.

    OK, so here is the code I have so far. The Main class where I have the problem it is looping once the round is over and the balance is added from the winning tosses. I can't figure out the loop runs...
  10. Replies
    11
    Views
    1,133

    Re: Arraylist of averages of two arrays list

    Ok so I got it all to work except for the formatting i've got some reading to do on formatting but input on how to make all nice and would be nice below is code so far everthing works as it should.
    ...
  11. Replies
    11
    Views
    1,133

    Re: Arraylist of averages of two arrays list

    So this below would be enough ? I just thought that a new loop would be necessary in order to set all four values in the grade array. Does this loop set all four values for grade array or is it...
  12. Replies
    11
    Views
    1,133

    Re: Arraylist of averages of two arrays list

    I see now setting the grades in the array before knowing the averages makes no sense so array should be empty, but should it be like this:




    for(int i = 0; i < average.length; i++)
    {...
  13. Replies
    11
    Views
    1,133

    Re: Arraylist of averages of two arrays list

    So in the loop would be written something like this:




    for(int i = 0; i < average.length; i++)
    {
    average[i] = (testOne[i] + testTwo[i]) / 2;
    System.out.println(average[i]);
    }
  14. Replies
    11
    Views
    1,133

    Arraylist of averages of two arrays list

    I have written the code below the third array is suppose to store the averages of test scores from the first two arrays that were entered, fourth array stores letter grade. My question is do I need...
  15. [SOLVED] Re: Please help with my while loop that turned into infinite loop!

    So thank you to all who replied. Big thank you too Norm I guess I really need to sit down sketch out the logic and then write the code.
    Here is the rewritten working code.





    import...
  16. [SOLVED] Re: Please help with my while loop that turned into infinite loop!

    Ok, so i need to include the menu inside the while statement I see I will post new code here as soon as I get a chance I really do appreciate the help.
  17. [SOLVED] Re: Please help with my while loop that turned into infinite loop!

    How do I do that? I thought that's what the break was for in the switch.
  18. [SOLVED] Re: Please help with my while loop that turned into infinite loop!

    I initially wrote the code without the if else statement and the loop was still infinite it just keep displaying the equation until I closed the program. But I can see how the if else statement makes...
  19. [SOLVED] Re: Please help with my while loop that turned into infinite loop!

    Thank you for the replies the program should go like this:

    Display five options for a calculation
    Ask for selection
    First integer
    Second integer
    if 5 is selected program terminates.
    else...
  20. [SOLVED] Please help with my while loop that turned into infinite loop!

    I wrote the code below for class assignment was to create program that does a calculation based on unput from menu and would continue to loop until user inputed exit number. But when compiled instead...
  21. [SOLVED] Re: Can someone help with my code and psuedocode.

    Sorry, professor asked us to include it at the very begining of our code. I am also not sure if the bills needs to be in the inputs.


    /*
    * Program will prompt for monetary value and display...
  22. [SOLVED] Re: Can someone help with my code and psuedocode.

    Thanks for the reply so essentially the psuedocode should have the same amount of lines as the code? I am new to forums and do not know the rules here I will wrap the code as soon as I figure out how.
  23. [SOLVED] Can someone help with my code and psuedocode.

    I am new to programing and am taking intro to Java this semester. First project is program that determines least amount of bills and coins of a given amount. It is very basic and also was told to...
Results 1 to 23 of 24