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...
Type: Posts; User: Kristenw17
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...
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...
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
...
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...
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;...
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...
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...
Thank you very much. I was able to find my error.
#1: cannot find symbol - variable setAmount
#2: cannot find symbol - variable datePaid
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...
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...
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...
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...
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...
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]?
The editor highlights
split = fractions[i].split("/");
I also tried
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...
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...
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...
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...
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...
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....
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...
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....
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....