import java.util.*; import java.io.*; public class Prosak{ String failinimi ; String taht; Vector v; StringTokenizer st; Prosak(String failinimi ,String taht) throws Exception { this.failinimi=failinimi ; this.taht=taht ; v=new Vector(); this.loeStringi() ; } void loeStringi() throws Exception { String temp="" ,result=""; BufferedReader br=new BufferedReader (new FileReader(failinimi)) ; while((temp=br.readLine())!=null){ result+=temp+" " ; } st=new StringTokenizer(result); this.createVector() ; writeToFile("c:/gunnar/output"); } void createVector(){ while(st.hasMoreTokens()) { v.add(new Sona(st.nextToken())); } //this.printOut(); } /* void printOut(){ int i; for (i=0 ;i0){ out.println(suurim().getString()) ; } } Sona suurim(){ int pos=0 ; Sona max=((Sona)(v.elementAt(pos))); int i; for(i=1;imax.getProsak()){ max =temp ; pos=i; } } v.removeElementAt(pos); return max ; } public static void main(String args[]) throws Exception { if(args.length!=2){System.out.println("Tekkis viga command line-lt") ;} else{ new Prosak(args[0],args[1]); } } /***********************************/ class Sona{ String sona ; double protsent ; Sona( String s ){sona=s ; protsent=prosa(taht,s); } double prosa(String taht,String sona){ int mitu=0 ; int i=0 ; for( ;i