User Profile

Collapse

Profile Sidebar

Collapse
tomshorts07
tomshorts07
Last Activity: May 6 '08, 10:42 PM
Joined: Apr 17 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • tomshorts07
    replied to Median Statistical function
    in Java
    thanks nepomuk,
    your explanation is really helpful, and i really understand how to implement the method a lot better now.
    theres just one thing about your explanation that i dont understand-
    your 'helparray' section.
    i was just hoping you could explain this part a little bit more in detail.
    for example, why is this array only 3 items deep? wouldnt it be easier to just use 2 values, allowing you to calculate...
    See more | Go to post

    Leave a comment:


  • tomshorts07
    replied to one more question!
    in Java
    thats what i was thinking of using, BUT in order to properly 'grade' the students- it has to return the percentage of the answers that are correct, which means possibly writing possibly hundreds of if () statements,

    if anyone has any idea how to avoid this, im all ears!
    See more | Go to post

    Leave a comment:


  • tomshorts07
    replied to Number Averager
    in Java
    alrighty, i figured it out kidprogrammer!

    you have to define the variables in the beginning of the program
    Code:
      Scanner scan = new Scanner (System.in);  //create a scanner
             double area;
             double n1=0;
             double n2=0;
             double n3=0;
             System.out.println("This program will average 3 numbers."); //explain the program
             System.out.println("Please
    ...
    See more | Go to post

    Leave a comment:


  • tomshorts07
    replied to Number Averager
    in Java
    you didnt declare the variable correctly

    all of those errors- (the ones that say cannot find symbol) are caused because you are supposed to use a 'double' variable type

    rather than declare it as
    Code:
    int area = (n1 + n2 + n3) / 3;        //calculate the area
    reformat it to be
    Code:
    double area = (n1 + n2 + n3) / 3;        //calculate the area
    and it should work fine!
    See more | Go to post

    Leave a comment:


  • tomshorts07
    replied to one more question!
    in Java
    i almost forgot- for the sake of ease - and maybe to help understand the program a little better, include the code----

    Code:
           public static void main (String[] args)throws IOException {
              
             int x = 0;
             int key[]; //array with the correct answers
             Scanner scan = new Scanner(new File("Grades"));//file with answer key and 'student answers'
             int size =
    ...
    See more | Go to post

    Leave a comment:


  • tomshorts07
    started a topic one more question!
    in Java

    one more question!

    hey everyone!

    thanks so much for the help with my grading program that accesses from a file! i just have one more question, basically more of a syntax question

    for those that want to refresh - the original discussion is posted here =
    http://bytes.com/forum/thread794116.ht ml

    what i need to know is, does anyone know how to formulate the code to COMPARE the 'answer key' array to the other arrays...
    See more | Go to post

  • tomshorts07
    started a topic Median Statistical function
    in Java

    Median Statistical function

    hi everyone!

    i was wondering if anyone had any ideas on how to go about coding a method that would determine the median of a list of numbers

    just to clarify- a median is the 'middle value' when all of the numbers are placed in increasing order;
    for example- the median of
    3 6 12 40 41 57 58 90
    is 40.5

    i was thinking about using a method that sorts the list in increasing order, then...
    See more | Go to post

  • tomshorts07
    replied to JAVA grading program
    in Java
    i understand-
    the main problem that i am having with the program is the java.io.* functions?

    i cant figure out how to compose the code to make the program read the file and create the array

    im sorry, i should have specified this in the first post

    if anyone can help me figure out just simply how to create the arrays from the .txt file, i should be fine from there!

    THANKS A TON!
    See more | Go to post

    Leave a comment:


  • tomshorts07
    started a topic JAVA grading program
    in Java

    JAVA grading program

    hey everyone, i'm new to JAVA, and i'm trying to make a program that takes a .txt file with the format

    10 4 2 2 3 1 5 4 2 4 4
    Joe, 4 4 1 3 2 5 4 2 4 3
    Mary, 4 2 2 3 2 5 3 2 4 4
    Fred, 3 2 2 3 1 5 4 2 4 4

    ***(the first line is the 'answer key'; the first number indicates the total number of answers, and the numbers that follow are the 'correct' answers.
    the lines following the 'answer key' are...
    See more | Go to post
No activity results to display
Show More
Working...