Here's a screenshot of everything, the attached file is horribly pixelated so use this link : http://i56.tinypic.com/1xxfnn.png
Type: Posts; User: Scippi
Here's a screenshot of everything, the attached file is horribly pixelated so use this link : http://i56.tinypic.com/1xxfnn.png
CS1 2012 Group 1 - printed first using scanner.hasNextLine()
8 - printed second as int on a new line scanner.hasNextInt()
One number was printed before the error which is the 8...
The first line is 5,5,5,6,5,8,9,5,6,8, good, very good, excellent, good and I've set the delimiter to a comma so I would've thought it'd print the first integer before crashing since I can't see...
Oh so sorry, yeah the Cohort and numberOfResponses get printed out fine. The program prints those two lines, then goes to print the actual data, starting with the integers, and that's when the error...
I mentioned this error earlier, the full content of the console is: java.util.InputMismatch exception: null(in java.util.Scanner)
No, I get the error everytime it gets to the line studentResponses[row][column] = scanner2.nextInt();
Well I've asked someone in my class to give me some pointers so I'm just trying out his method. Yeah I usually use studentResponses.length rather than a number, the 8 was just there for testing...
I think this should work, basically it's going to print out everything again separated by a space rather than comma and put a tab space between the numbers and the strings. However I'm still getting...
I see, so what modifications would you suggest I make to my code?
The loop that prints out everything being read in is
for (int column = 0; column < studentResponses[0].length; column++){
studentResponses[row][column] =...
Thanks for your responses. This is my attempt:
public void readMarksData(String fileName, int numberOfStudents, int responsesPerStudent) throws FileNotFoundException
{
int...
Hi guys,
I'm currently stuck on a programming assignment which requires me to read in data from a text file then process it. The file looks like this:
CS1 2012 Group 1
8
5,5,5,6,5,8,9,5,6,8,...