/* * Writter By : Ahmad Jawed ZAFAR * Date : 17/01/2010 * Web Site : www.yashlar.net * Description : this programs reads students information from two separate files called f1.txt * and f2.txt. the first file contains students id, name and surname. the second file contains * each students id and the city where the students lives. our programs reads both files and * prints the students list according to their city. i mean it prints each city and information * of the students who lives in that city. * if the students name or surname of his/her city consists of two or more words, then put underscores * or dashes to separate these words, be careful not to put space. put space character only * to separate each category (id, name, surname). * * Example File * * f1.txt * 55 arda turan * 43 hakan shukur * 27 ahmad-jawed zafar * * f2.txt * 55 istanbul * 43 ankara * 27 faryab * */ import java.util.*; import java.io.*; public class Students { public static String[] name=new String[20]; public static String[] sName=new String[20]; public static int[] id=new int[20]; ///=========================================================================== public static int[] idsTmp=new int[20]; public static String[] cityTmp=new String[20]; public static String[] city=new String[20]; public static int[][] ids=new int [20][20]; public static int numStudents = 0; ///--------------------------------------------------------------------------- public static void main(String[] args) { file1("f1.txt"); file2("f2.txt"); for(int i=0;i