Search:

Type: Posts; User: Kristenw17

Search: Search took 0.21 seconds; generated 51 minute(s) ago.

  1. Issue concerning keeping track of array elements (possibly caused by a mistake in a loop)

    I have two classes. Term, which holds two variables: coeff and power.
    The second class is Polynomial. Each polynomial is an array of Terms. I did not write the constructors for the Polynomial...
  2. Traversing a binary tree while looking for a string

    I am unsure how to look to see if the string in the current node is the same as the message I am looking for.I thought about using compareTo(), but then I wasn't sure if what would work or not. So...
  3. Searching a binary tree for specific char

    So I am trying to figure out how to create a method that will search for a specific char, as well as keep track of the route used to reach it in the tree.
    The method call looks like

    ...
  4. Replies
    1
    Views
    421

    Creating an exception class

    I had to make two classes that search a String array for specific words, and a ItemNotFoundException class. I do not think the exception class is working correctly though. I am not completely sure...
  5. Thread: Nodes

    by Kristenw17
    Replies
    2
    Views
    414

    Nodes

    So I absolutely cannot figure out nodes. I have no clue what I am doing. I can't figure out how to do the add method. So far all I have is:




    public class List{

    Node head = null;...
  6. Replies
    2
    Views
    336

    Compare two date objects

    I made a bill class that uses a date and money class to create bills.
    I have to be able to check whether the paid date is before (or on) the due date. I am unsure of how to compare the dates.

    I...
  7. Replies
    1
    Views
    362

    Objects and Classes

    I made a Bill class that uses a Money class and a Date class. I used the driver bellow and noticed that after I change the amount and dueDate following the first set of println statements, that all...
  8. Replies
    4
    Views
    537

    [SOLVED] Re: Cannot Find Symbol Compiling Error

    Thank you very much. I was able to find my error.
  9. Replies
    4
    Views
    537

    [SOLVED] Re: Cannot Find Symbol Compiling Error

    #1: cannot find symbol - variable setAmount
    #2: cannot find symbol - variable datePaid
  10. Replies
    4
    Views
    537

    [SOLVED] Cannot Find Symbol Compiling Error

    So I am making a bill class, which will (hopefully) work with a Money and Date class.
    So far (I only tested a little code so far) two of my method are getting a Cannot find symbol error. I have...
  11. Using Euclid's algorithm in a Fraction Class

    I am trying to use Euclid's Algorithm in a fraction class. I am not finished with the class yet so there are parts that are incomplete. I am unsure of how I would use the method. Would I put in the...
  12. Replies
    1
    Views
    535

    Array, fractions, etc

    So here is what I am trying to accomplish: I am creating a program with two classes: Fraction and FractionCounter. I am having some major problems (mostly because I am unsure of how to to the basic...
  13. Replies
    2
    Views
    536

    Counting Loop and Outputting

    Alright so I made a program that will count the number of fractions in a file and then output the number of times each fraction appeared. I got
    it to count the fraction and output. The problem is...
  14. Replies
    9
    Views
    566

    Re: Array and counter in for loop

    So I have managed to get most of my code done (i hope). I am only having a couple issues. The first is that I am unsure how to distinguish when a fraction has already been counted. For example with a...
  15. Replies
    9
    Views
    566

    Re: Array and counter in for loop

    Yes. The fractions array has 100 slots. It has that many because I won't know the size of the file that is used to test my code. Is there another way to do the array without setting it at [100]?
  16. Replies
    9
    Views
    566

    Re: Array and counter in for loop

    The editor highlights



    split = fractions[i].split("/");


    I also tried
  17. Replies
    9
    Views
    566

    Re: Array and counter in for loop

    Thank you very much. That fixed it. Don't suppose you can solve my other problem of why I am getting a java.lang.NullPointerException? I tried making my String[]split just a string, but it didn't...
  18. Replies
    9
    Views
    566

    Array and counter in for loop

    I need to be able to use the counter and the array in the same loop. The way it is now I get a java.util.NoSuchElementException (no line found). How can i change my code so that it is no longer...
  19. Create two dimensional array from a one dimensional array

    I am trying to add fractions from a file. I have managed to put each line into a string array.
    example file:
    3/2
    4/3
    5/6

    array: 3/2, 4/3, 5/6

    How can I split up these numbers so that a...
  20. Replies
    4
    Views
    505

    Re: File reading issues

    line = file.next();
    System.out.println(line);

    I did the print line to make sure that the fractions were in fact filling the array. They are not. I can't figure out how to put the numbers into the...
  21. Replies
    4
    Views
    505

    File reading issues

    So my end goal is to have read a file containing fractions, and be able to count the number of times a specific fraction appears.
    Example file:
    6/3
    7/2
    6/3
    5/2

    So far I have been able to get...
  22. Replies
    1
    Views
    810

    String to Array?

    OK so I actually have a couple basic problem but the most important problem is the array. I am making a hangman game. I have a driver that was supplied but it is actually confusing me more.

    1....
  23. Replies
    1
    Views
    425

    Array and loop

    Goal: To count the number of times each letter (a-z) is used in a file. The code is workin (atleast it appears to be), but I have a couple issues.

    1. I am wanting the array to be initialized in...
  24. Replies
    1
    Views
    623

    Array and Loop?

    Goal: To count the number of times each letter (a-z, both upper and lower case) appears in a file. Lower and upper case versions count as the same letter. So a's and A's both will be counted as a's....
  25. Replies
    1
    Views
    362

    Array and Loop?

    Goal: To count the number of times each letter (a-z, both upper and lower case) appears in a file. Lower and upper case versions count as the same letter. So a's and A's both will be counted as a's....
Results 1 to 25 of 25