Search:

Type: Posts; User: LoganC

Page 1 of 4 1 2 3 4

Search: Search took 0.10 seconds.

  1. Replies
    2
    Views
    1,256

    Large number while adding arrays

    I am trying to add the arrays in the method anArray, but when i try to see the value, which should be 134/3 , it is returning "Their Test Sum = 33500" instead of the value of 134/3, why is it...
  2. Replies
    5
    Views
    1,054

    Re: Returning An Array

    For example,
    scores[3] = Integer.parseInt(strLine); ? I am not receiving an error on that but i want to return all of the scores and not just one of them

    --- Update ---

    Hmm wait, i think i...
  3. Replies
    5
    Views
    1,054

    Re: Returning An Array

    Hmm I think I understand, but now I am getting an error saying ';' expected and return scores; is not a statement.


    public static int[] processFile (int[] scores) throws IOException,...
  4. Replies
    5
    Views
    1,054

    Returning An Array

    Hello I am trying to sort a list of numbers on seperate files from a text document in C:/Scores.txt. First off in processFile I am trying to return the numbers located in the file as an array. I am...
  5. Replies
    5
    Views
    1,378

    Re: Assigning values to objects.

    It is just part of my assignment that I have to use the handScore method to figure out the "score" of the current hand of the beholder, I just wanted to test by using my own arrays and then modify...
  6. Replies
    5
    Views
    1,378

    Re: Assigning values to objects.

    Would this be the correct application?


    public int handScore () {


    Card threeOfClubs = new Card (0, 3);
    Card aceOfHearts = new Card (3, 1);
    Card...
  7. Replies
    5
    Views
    1,378

    Assigning values to objects.

    I am having some trouble understanding how to assign values to objects. I am trying to assign it so that method handScore will return the four cards in the method. I want to make it so that Ace of...
  8. Replies
    4
    Views
    1,208

    Re: Printing From Another Class.

    I have tried removing the parameters and still I am getting cannot find symbol on card.printCard();


    public class Card {
    int suit, rank;

    public Card () {
    this.suit = 0;...
  9. Replies
    4
    Views
    1,208

    Re: Printing From Another Class.

    Hello Curmudgeon, what if I want to pass (1, 11) into the method printCard? Would I add (1, 11) into the printCard method?

    --- Update ---

    Also, in main I have tried adding card.printCard(); and...
  10. Replies
    4
    Views
    1,208

    Printing From Another Class.

    I am trying to print from a different class, and this is my current code. The last code entry is the mainclass, and "Card" is showing up as cannot find symbol error. I am trying to print printCard...
  11. Replies
    3
    Views
    1,163

    Printing an array.

    I am having trouble trying to call printArray in main. I want to output (array) in the method printArray.

    /*
    * To change this template, choose Tools | Templates
    * and open the template in the...
  12. Replies
    1
    Views
    1,673

    "Reduce" Method and Adding Rational Numbers

    This is the part of the homework where I am stuck:
    Write a modifier named reduce that reduces a rational number to its lowest terms by finding
    the GCD of the numerator and denominator and then...
  13. Replies
    6
    Views
    1,607

    Re: Adding integers from a file

    I could do that, but I do not know how to read each line seperately.
    Update: I was able to add up all of the integers, and display what it equals, but now how do i get the mean or avg of these?
    For...
  14. Replies
    6
    Views
    1,607

    Re: Adding integers from a file

    In my textfile, my goal is to add up the sum of all the integers, the text file is in a formal like this;
    15
    14
    23
    18
    74
    38
    One per line. That is the only thing in the textfile, integers. I am...
  15. Replies
    6
    Views
    1,607

    Re: Adding integers from a file

    Any help would be appreciated. I added a parse to double, so now the string that is read from the file is converted to a double.
  16. Replies
    6
    Views
    1,607

    Adding integers from a file

    My program works effectively, but now I have to add up the total of the integers. How would I go about doing this? The program is just reading a simple file in c:/ which it does, and displays the...
  17. Replies
    3
    Views
    1,626

    Re: New Line in swing

    Still need a little help w/ this.
  18. Replies
    3
    Views
    1,626

    Re: New Line in swing

    Cannot find value append.... :s
  19. Replies
    3
    Views
    1,626

    New Line in swing

    How do i add a new line in Swing? Im using netbeans, here is my source code:
    This is what it outputs:
    I want the output to be organized, like this:
    1 Computer - 706
    100 Computers = 70600
    200...
  20. Replies
    8
    Views
    1,005

    Re: Adding if statements.

    Sorry for the confusion, I deleted the duplicate method and I am trying to add up the sum of all the elements in the method to a total. What should I try next?
  21. Replies
    8
    Views
    1,005

    Re: Adding if statements.

    So instead of declaring them in the if statements, I should just return them?
  22. Replies
    8
    Views
    1,005

    Re: Adding if statements.

    Fixed. I am trying to add up the returns of all of my if statements, but where I have tried to do it, they all say
    double finalCostOfComputer = computerBase+printer+speakers+mouse+mousepad+headset...
  23. Replies
    8
    Views
    1,005

    Adding if statements.

    Few errors: in bold: cannot find symbol ( for the things in bold )
    trying to add together the if statements, but it isn't working, Im confused. My question is, how do i add what my if statements...
  24. Replies
    2
    Views
    1,064

    Trying to learn some swing.

    I am trying to learn some swing this week, one program I found to try and make was a simple GUI with checkboxes and buttons, which I have already made. The program would be used for selling computers...
  25. Replies
    15
    Views
    1,341

    Re: Swing (Problems)

    Hmm all areas are gone, but it's still not printing out for some reason.


    private void NameCheckerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_NameCheckerActionPerformed
    ...
Results 1 to 25 of 98
Page 1 of 4 1 2 3 4