Search:

Type: Posts; User: iAce

Search: Search took 0.10 seconds.

  1. [Help] How to read each column of data into a separate one dimensional array

    The list below has a list of stuff for my program that I need to read in. How do you read in the data column by column rather than row by row? I have to have 4 separate arrays to read in the years...
  2. Replies
    7
    Views
    2,281

    Re: Password Generating Program Help

    I meant to put randNum where it originally said in.nextInt();


    if (selection == 1) // If they choose Menu Option 1, then this code below will execute.
    {
    while (randNum >= 97 &&...
  3. Replies
    7
    Views
    2,281

    Re: Password Generating Program Help

    It's blank. I must have made an error somewhere. I don't really know where though.
  4. Replies
    7
    Views
    2,281

    Re: Password Generating Program Help

    Something like this?


    if (selection == 1)
    {
    while (randNum >= 97 && randNum <= 122)
    {
    for (int loop = 0; loop <= passLength; loop++)
    {
    ...
  5. Replies
    7
    Views
    2,281

    Password Generating Program Help

    I have to code a program that generates a random password for the user based on the character set they choose from. I did the code to generate the numbers (which I later have to convert to...
  6. Re: Dice Rolling Probability - How Do I Start It Off?

    Okay well here's what I have so far. I'm not sure if even this is correct. How do I display the number of times it matches for each sum?


    import java.util.Random;
    import java.util.Scanner;...
  7. Re: Dice Rolling Probability - How Do I Start It Off?

    Yeah, that was a bad example. If it was only 1 roll, then it would be 100% for one combination. I think 100 rolls would be better. So, how would I code this problem?
  8. Re: Dice Rolling Probability - How Do I Start It Off?

    I meant the user would enter in 1 as the number of rolls they want. Basically, it's like this:
    -Ask the user to input how many times the dice will be rolled.
    -Calculate the probability of each...
  9. Re: Dice Rolling Probability - How Do I Start It Off?

    It's similar to what you said. I need to display the probability of how many times a combination will occur depending on how many rolls the user input.

    For example, since I'm doing a 2-sided dice...
  10. Re: Dice Rolling Probability - How Do I Start It Off?

    It's supposed to represent all the possible sums I could get from the dice. So the lowest possible number would be 2 and the highest would be 4.

    If the sum on the dice is equal to the sum, then it...
  11. Dice Rolling Probability - How Do I Start It Off?

    Just a quick question on how to start off a code on this. The program is supposed to simulate tossing a pair of 2-sided dice and determining the percentage of times each possible combination of the...
  12. Replies
    3
    Views
    1,085

    Re: [Help] For Loops - Number Predicting Program

    Okay thank you. That'll be a start. I kind of have an idea of how to do this now. Why does this belong in the Java Theory board? Because it's Java lol? Or because I don't actually have a code to...
  13. Replies
    3
    Views
    1,085

    [Help] For Loops - Number Predicting Program

    Hello, I need help with my code again. The steps below are the things I need in my code.

    1. The computer should randomly pick a three digit lottery number ranging from 000 through 999.
    2. Use a...
  14. Replies
    8
    Views
    1,518

    Re: Reading Text Files Assignment [Scanner Method]

    Oh wow I'm mad that it does already. I didn't even notice. I added another counter variable and the code runs perfectly now. Thanks a lot bro. Much love.
  15. Replies
    8
    Views
    1,518

    Re: Reading Text Files Assignment [Scanner Method]

    I meant like how can I make it so that each line can be read one at a time to determine if it is equal to BB, BG, GB, or GG. I don't know how to do that.

    And that's another problem I have. I don't...
  16. Replies
    8
    Views
    1,518

    Re: Reading Text Files Assignment [Scanner Method]

    In Step 3, I know I'm using Scanner inFile = new Scanner(new File("test1.txt")); to read the text file while the while loop is going. It will terminate after the last line is read.

    My problem is...
  17. Replies
    8
    Views
    1,518

    Re: Reading Text Files Assignment [Scanner Method]

    Thanks for the reply. Usually the errors are just variables that I haven't declared yet. Here are the things I need to code this program correctly (I think).
    (1) Declare all variables.
    (2) Declare...
  18. Replies
    8
    Views
    1,518

    Reading Text Files Assignment [Scanner Method]

    I'm a beginner coder in Java and I'm confused about how to code this one assignment I have. If I can get any help, then it would be fantastic. :)

    I am using BlueJ.

    Assignment:
    Write a program...
  19. Thread: Hi

    by iAce
    Replies
    0
    Views
    874

    Hi

    Yo, I'm Ace. I'm a rookie Java coder taking an AP Comp Sci class. I hope I'll be able to get some help from this community. :)
Results 1 to 19 of 19