Okay well I figured out how to test the contents of my list properly if anyone is wondering here is my test case:
@Test
public void testMinCoins() {
System.out.println("minCoins");...
Type: Posts; User: vysero
Okay well I figured out how to test the contents of my list properly if anyone is wondering here is my test case:
@Test
public void testMinCoins() {
System.out.println("minCoins");...
So I am brand spanking new to JUnit testing and code testing in general. I found a helpful guide on YouTube but it only got me so far. I wrote a simple Change Making problem and now I want to do some...
Wow, okay I am sorry. I guess I just missed that. Thank you!
So its odd because there is no variable in line 8. Line 8 is the method deceleration:
public static void main(String[] args) throws IOException {
--- Update ---
Yeah I can't seem to figure...
Okay so I have no idea why this is happening. Its not even a question about methodology I am just wondering if I should build a new project or something at this point because I can't see how/why I am...
Okay so instead of running the loop the size of the original array I need to run it for the size of the second array, is that what your saying? This worked but apparently my attempt at neglecting...
Honestly, I thought that's what I was doing with my first condition statement namely:
if(array[i][j] != array[0][j])
That should say hey ignore the first row.
Now if I set the second...
So I guess what I am trying to avoid is this. Lets say I set up my code like:
if(array[i][j] != array[0][j]){
if (array[i][j].equals("\u221E")) {
...
Yes I haven't had too much trouble with separating row 0 data. The trouble is with saving the following rows into a separate array. Specifically, this is how I am attempting to ignore the first row...
Eventually I would like to write create a minimum spanning tree using Prim's algorithm. However, I am have having trouble with reading data from a csv text file and converting those strings into...
Alright great I figured it out. Thanks for your help Norm I appreciate that!
Okay yeah that makes sense. As you know the input file is:
A,B,C,D,E,F
∞,1,∞,∞,∞,∞
∞,5,∞,1,11,∞
∞,∞,∞,∞,∞,∞
5,∞,∞,∞,3,∞
∞,∞,∞,11,∞,7
∞,∞,3,∞,∞,∞
So I think I am close; however, I am getting some weird output when I print the contents of my array. So the input file is just a text file not an actual csv file but here is what the contents of the...
You Sr. are a genius, thank you!
Okay here's my program as I think it should work:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
...
Well I can split the string up into tokens separated by spaces. However, I can't seem to figure out how to then take each of those tokens and write them to a file. For instance, if the input file...
So given an input file, input.txt. I am trying to write a program that will firstly: print each line from input.txt line by line as it appears in the text file. So lets say the text file says:
...
Sorry I am still confused. So here is what I think this might look like:
In my main in Case 0 (enqueue) just after I pass the values for a/an airline passenger I thought I would write:
...
Hello okay so my assignment was to create a priority queue for Airline Passengers. Here is what I have done so far:
//Driver
package priorityqueuestandby;
import...
Hey this is good thank you, however; I am still having issues. So I can get it to print like today's date:
package testdates;
import java.text.DateFormat;
import java.util.Date;
public...
If I wanted to take strings in from the user through a GUI say day, month, year. I am looking for a way to organize those incoming strings. I am going to add this information to a queue. However, I...
Okay so now I am thinking I shouldn't be trying to return anything at all. Which puts me back at square one were void type cannot be converted to Person.
Well when I push a person and set it equal to firstLink doesn't that make firstLink a reference to a person object?
firstLink = new ListNode(person, firstLink);
Ah ic so I changed the method type to ListNode but now I can't use the method since its of type Node and Node cannot be converted to Person. Is there any way around this or am I not going to be able...
Right but the method isn't actually void. That's why I am so confused. Here is the method:
public static pop()
{
firstLink = firstLink.next;
return(firstLink);
}
...