Search:

Type: Posts; User: Kristenw17

Search: Search took 0.30 seconds.

  1. Replies
    1
    Views
    107

    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...
  2. Thread: Nodes

    by Kristenw17
    Replies
    2
    Views
    122

    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;...
  3. Replies
    2
    Views
    108

    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...
  4. Replies
    1
    Views
    140

    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...
  5. Replies
    4
    Views
    130

    [SOLVED] Re: Cannot Find Symbol Compiling Error

    Thank you very much. I was able to find my error.
  6. Replies
    4
    Views
    130

    [SOLVED] Re: Cannot Find Symbol Compiling Error

    #1: cannot find symbol - variable setAmount
    #2: cannot find symbol - variable datePaid
  7. Replies
    4
    Views
    130

    [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...
  8. 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...
  9. Replies
    1
    Views
    117

    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...
  10. Replies
    2
    Views
    172

    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...
  11. Replies
    9
    Views
    200

    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...
  12. Replies
    9
    Views
    200

    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]?
  13. Replies
    9
    Views
    200

    Re: Array and counter in for loop

    The editor highlights



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


    I also tried
  14. Replies
    9
    Views
    200

    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...
  15. Replies
    9
    Views
    200

    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...
  16. 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...
  17. Replies
    4
    Views
    152

    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...
  18. Replies
    4
    Views
    152

    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...
  19. Replies
    1
    Views
    389

    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....
  20. Replies
    1
    Views
    302

    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...
  21. Replies
    1
    Views
    319

    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....
  22. Replies
    1
    Views
    204

    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 22 of 22