Could you help me out to program... Asks the user to enter the file names and get Barchart andrank them.. Please use "PrintWriter class and selectionSort" Example file... File1.txt 40 20 10 File2.txt 100 20 30 File3.txt 10 20 30 Outcome is that File1 ******* File2 *************** File3 ****** Rank Report Rank #1 : File2 Rank #2 : File1 Rank #3 : File3 Could you help me out to program... Asks the user to enter the file names and get Barchart andrank them.. Please use "PrintWriter class and selectionSort" Example file... File1.txt 40 20 10 File2.txt 100 20 30 File3.txt 10 20 30 Outcome is that File1 ******* File2 *************** File3 ****** Rank Report Rank #1 : File2 Rank #2 : File1 Rank #3 : File3
Explanation / Answer
please rate - thanks "I'm going to be late for work" this ok - output goes to screen not file import java.util.*; import java.io.*; public class BarChart2 {public static void main(String[] args)throwsFileNotFoundException {int i; String filename; int stores=3; int total[]=new int[stores]; int trans[]=new int[stores]; int order[]=new int[stores]; Scanner key=new Scanner(System.in); for(i=0;i