import java.io.*;
import java.util.Scanner;
/**
*
* @author Raven
*/
public class RosetteAsg5 {
public static void main(String[] args) throws FileNotFoundException {
final int SIZE = 10;
File file = new File("C:/Users/Raven/DocumentsColeAsg.txt");
Scanner inputFile = new Scanner(file);
}
}
Ok I don't even know where to start.I created the text file and everything, I just basically need to know how would i sort strings using arrays
Here is what I have to do
Create a text file (using Notepad or another text editor) with at least 10 lines that contain a last name, a comma, and a double-precision number, like this:
Cole,11371.50
Andrews,22731.40
2. Read each line and put the name into an array of strings and the number into an array of doubles.
3. Sort the array of names.
4. Print the sorted list of names and the associated number next to it, in columns. This means you will have to keep track of which name and number go together. Thus for the above input, you would print:
Andrews 22731.40
Cole 11371.50

New Topic/Question
Reply




MultiQuote








|