Results 1 to 10 of 10
  1. #1
    bitbyamonkey is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default I need to somehow add multiple numbers into an array to be used a later time

    i want to create a program that when i press a button it will input marks that i tell it one by one listing them in a textArea. Then when i press a different button i want it to sort out the marks numerically. Then finally a button to list off the average, min, max, the range and finally What level each mark is. I can probably do most of it. my main issue is that i cannot get the marks input one by one. I would appreciate any help that can be given. Thank you.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: I need to somehow add multiple numbers into an array to be used a later time

    get the marks input one by one.
    You don't say what a mark is or where you get it from.
    You could use JOptionPane to prompt the user to get the input one by one

  3. #3
    bitbyamonkey is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: I need to somehow add multiple numbers into an array to be used a later time

    Quote Originally Posted by Norm View Post
    You don't say what a mark is or where you get it from.
    You could use JOptionPane to prompt the user to get the input one by one
    i am trying to make a textfield then you input the mark, press a button and it lists that mark in a text area. i want to list them off one at a time.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: I need to somehow add multiple numbers into an array to be used a later time

    What is a mark?

  5. #5
    bitbyamonkey is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: I need to somehow add multiple numbers into an array to be used a later time

    Like a grade. 50%, 40% etc

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: I need to somehow add multiple numbers into an array to be used a later time

    A String of 1 to 3 digits followed by a %

  7. #7
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default Re: I need to somehow add multiple numbers into an array to be used a later time

    Quote Originally Posted by Norm View Post
    You don't say what a mark is or where you get it from.
    You could use JOptionPane to prompt the user to get the input one by one
    Either that and you pop up OptionPanes as long as not "End" or something is entered, or a custom Dialog, that is triggered from the main screen and can be closed when the user is done.

    @OP: keep it simple and try to code the input part first, when done you can start doing the calculations.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  8. #8
    bitbyamonkey is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: I need to somehow add multiple numbers into an array to be used a later time

    Quote Originally Posted by Norm View Post
    A String of 1 to 3 digits followed by a %
    Yes. A bunch in an array.

  9. #9
    bitbyamonkey is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: I need to somehow add multiple numbers into an array to be used a later time

    Quote Originally Posted by PhHein View Post
    Either that and you pop up OptionPanes as long as not "End" or something is entered, or a custom Dialog, that is triggered from the main screen and can be closed when the user is done.

    @OP: keep it simple and try to code the input part first, when done you can start doing the calculations.
    I was hoping to keep it to an array/arraylist
    I am also verryyy neew to Java so if you have any idea could you post an example

  10. #10
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default Re: I need to somehow add multiple numbers into an array to be used a later time

    That's not how it works. You try yourself and when you have specific questions or get stuck you can ask here.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

Similar Threads

  1. Replies: 26
    Last Post: 12-03-2013, 02:55 PM
  2. playing multiple wavs at the same time.
    By phil128 in forum Threads and Synchronization
    Replies: 0
    Last Post: 01-19-2011, 02:00 PM
  3. Waiting on multiple semaphores at the same time
    By flok in forum Threads and Synchronization
    Replies: 3
    Last Post: 11-10-2009, 03:31 PM
  4. upload multiple picture at one time
    By chaiwei in forum Java Applets
    Replies: 3
    Last Post: 10-30-2009, 05:39 AM
  5. Multiple Random Numbers
    By Jadles in forum New To Java
    Replies: 6
    Last Post: 02-26-2009, 11:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •