资源简介
南京大学软件学院2009级软件体系结构大作业,分为6项,包括项目的开发视图,部署试图
代码片段和文件信息
package nju.edu.mc;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Main {
private static ArrayList kwicList = new ArrayList();
private static String textLine;
private static ArrayList shiftedLineIndexes;
private static ArrayList sortedLineIndexes;
protected static BufferedReader input(String InputFilename){
BufferedReader input_file = null;
try {
input_file = new BufferedReader(new FileReader(InputFilename));
} catch (IOException e) {
System.err.println((“文件无法打开“ + e.toString()));
System.exit(1);
}
return input_file;
}
protected static void circularShift(BufferedReader br){
int countIndex = 0;
try {
while(br.ready()){
String line = br.readLine();
textLine = textLine+line+“ “;
StringTokenizer tokener = new StringTokenizer(line);
int index=0;
ArrayList tokensIndex = new ArrayList();
int count = tokener.countTokens();
countIndex++;
shiftedLineIndexes.add(countIndex);
tokensIndex.add(countIndex);
for(int t=0;t countIndex++;
if(line.substring(tt+1).equals(“ “)){
tokensIndex.add(countIndex);
shiftedLineIndexes.add(countIndex);
//System.out.print(countIndex+“ “);
}
}
for (int i = 0; i < count; i++) {
index=i;
int[] tempInt = new int[count];
for (int j = 0; j < count; j++) {
if (index >= count)
index = 0;
tempInt[j]=tokensIndex.get(index);
//System.out.print(tempInt[j]+“ “);
index++;
}
kwicList.add(tempInt);
//System.out.println(““);
}
}
/*for(int i=0;i System.out.print(shiftedLineIndexes.get(i)+“ “);
}*/
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//System.out.println(textLine);
}
protected static void alphabetizer(){
ArrayList strList = new ArrayList();
ArrayListsortedIndexes = kwicList;
for(int i=0;i String thisStr=““;
for(int j=0;j int index = kwicList.get(i)[j];
//System.out.println(textLine);
for(int m=0;m if(shiftedLineIndexes.get(m)==index){
if(m==shiftedLineIndexes.size()-1)
thisStr = thisStr+textLine.substring(index-1);
else
thisStr = thisStr+textLine.substring(index-1shiftedLineIndexes.get(m+1)-1);
}
}
}
//System.out.println(thisStr);
strList.add(thisStr);
}
for(int i=0;i for(int j=0;j
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 301 2012-05-24 10:34 KWIC_hw5\.classpath
文件 384 2012-05-24 10:34 KWIC_hw5\.project
文件 629 2012-05-24 10:34 KWIC_hw5\.settings\org.eclipse.jdt.core.prefs
文件 2891 2012-05-24 11:41 KWIC_hw5\bin\nju\edu\mc\Alphabetizer.class
文件 2119 2012-05-24 11:41 KWIC_hw5\bin\nju\edu\mc\CircularShifter.class
文件 999 2012-05-24 11:29 KWIC_hw5\bin\nju\edu\mc\Filter.class
文件 1665 2012-05-24 11:40 KWIC_hw5\bin\nju\edu\mc\Inputer.class
文件 2500 2012-05-24 11:32 KWIC_hw5\bin\nju\edu\mc\Main.class
文件 1451 2012-05-24 11:38 KWIC_hw5\bin\nju\edu\mc\Outputer.class
文件 1760 2012-05-24 11:40 KWIC_hw5\bin\nju\edu\mc\TextLinePipe.class
文件 27 2012-05-23 21:51 KWIC_hw5\input.txt
文件 58 2012-05-24 15:04 KWIC_hw5\output.txt
文件 1896 2012-05-24 11:41 KWIC_hw5\src\nju\edu\mc\Alphabetizer.java
文件 1286 2012-05-24 11:41 KWIC_hw5\src\nju\edu\mc\CircularShifter.java
文件 630 2012-05-24 11:29 KWIC_hw5\src\nju\edu\mc\Filter.java
文件 894 2012-05-24 11:39 KWIC_hw5\src\nju\edu\mc\Inputer.java
文件 1639 2012-05-24 11:32 KWIC_hw5\src\nju\edu\mc\Main.java
文件 801 2012-05-24 11:38 KWIC_hw5\src\nju\edu\mc\Outputer.java
文件 1193 2012-05-24 11:40 KWIC_hw5\src\nju\edu\mc\TextLinePipe.java
文件 301 2012-05-24 09:17 KWIC_hw4\.classpath
文件 384 2012-05-24 10:28 KWIC_hw4\.project
文件 629 2012-05-24 09:17 KWIC_hw4\.settings\org.eclipse.jdt.core.prefs
文件 2675 2012-05-24 10:28 KWIC_hw4\bin\nju\edu\mc\Alphabetizer.class
文件 1903 2012-05-24 10:28 KWIC_hw4\bin\nju\edu\mc\CircularShifter.class
文件 854 2012-05-24 10:28 KWIC_hw4\bin\nju\edu\mc\Filter.class
文件 1565 2012-05-24 10:28 KWIC_hw4\bin\nju\edu\mc\Inputer.class
文件 2482 2012-05-24 10:28 KWIC_hw4\bin\nju\edu\mc\Main.class
文件 1256 2012-05-24 10:28 KWIC_hw4\bin\nju\edu\mc\Outputer.class
文件 1438 2012-05-24 10:28 KWIC_hw4\bin\nju\edu\mc\TextLinePipe.class
文件 27 2012-05-23 21:51 KWIC_hw4\input.txt
............此处省略133个文件信息
- 上一篇:STM32基于GPRS以mqtt协议与onenet通信
- 下一篇:自动保存更改记录
相关资源
- 北邮:软件工程作业——体系结构设
- 西北工业大学软件学院网络与分布计
- DoDAF架构设计案例
- 山大计算机学院、软件学院《多媒体
- 北京邮电大学软件学院图书室管理系
- 计算机组织与体系结构 性能设计 第七
- 国防科大计算机体系结构最强复习资
- 清华大学计算机网络体系结构讲义
- 东北大学软件学院新一代互联网技术
- 山东大学软件学院数据库2019-2020第一
- 2019.12.19 山东大学软件学院软件工程期
- 山东大学软件学院2018-2019 数据结构真
- 中科院研究生院软件学院论文中期检
- 东北大学软件学院编译原理
- 北交计算机体系结构Cache实验报告
- 四川大学数字逻辑往届期末试题
- PCIE体系结构导读
- 大连理工大学 软件学院 软件测试与质
- 南京大学计算机考研复试历年上机试
- 软件体系结构课后作业及答案 软件体
- 软件体系结构实验报告设计模式
- 山东大学软件学院数据结构课设——
- 东北大学软件体系与结构四次实验源
- 2019-2020_南京大学计算机系数据库期末
- 2018-2019_南京大学计算机系数据库期末
- 四川大学软件学院软件工程自己整理
- 东北大学软件学院操作系统实验代码
- 南京大学CSAPP lab5-9
- 南京大学周志华老师的一个讲普适机
- 数据库 大连理工大学软件学院
评论
共有 条评论