-
大小: 1.98MB文件類型: .zip金幣: 2下載: 0 次發布日期: 2023-08-16
- 語言: Java
- 標簽: KWIC??Assignment??解答??
資源簡介
KWIC4種架構的Java實現,以及根據4個Assignment中要求做出的代碼修改,還有對Assignment中問題回答。代碼全部可以運行通過并實現規定的功能。前人傳的現在免分

代碼片段和文件信息
//?-*-?Java?-*-
/*
?*?
?*?
?*??Copyright?(c)?2002
?*??Institute?for?Information?Processing?and?Computer?Supported?New?Media?(IICM)
?*??Graz?University?of?Technology?Austria.
?*?
?*?
?*?
?*?
?*?
?*??Name:????KWIC.java
?*?
?*??Purpose:?KWIC?system?for?Software?Architecture?constructional?example
?*?
?*??Created:?11?Sep?2002?
?*?
?*??$Id$
?*?
?*??Description:
?*????The?basic?KWIC?system?is?defined?as?follows.?The?KWIC?system?accepts?an?ordered?
?*??set?of?lines?each?line?is?an?ordered?set?of?words?and?each?word?is?an?ordered?set
?*??of?characters.?Any?line?may?be?“circularly?shifted“?by?repeadetly?removing?the?first
?*??word?and?appending?it?at?the?end?of?the?line.?The?KWIC?index?system?outputs?a
?*??listing?of?all?circular?shifts?of?all?lines?in?alphabetical?order.
?*?
?*/
package?kwic.ms;
/*
?*?$Log$
?*/
import?java.io.FileInputStream;
import?java.io.FileNotFoundException;
import?java.io.IOException;
import?java.io.InputStream;
import?java.util.regex.Matcher;
import?java.util.regex.Pattern;
import?javax.swing.JFileChooser;
import?javax.swing.text.html.parser.Parser;
/**
?*?The?KWIC?class?implements?the?first?architectural?solution?for?the?KWIC
?*?system?proposed?by?Parnas?in?1972.?This?solution?is?based?on?functional
?*?decomposition?of?the?system.?Thus?the?system?is?decomposed?into?a?number?of
?*?modules?each?module?being?a?function.?All?modules?share?access?to?data.?We
?*?call?the?shared?data?in?this?case?“core?storage“.?Thus?the?architectural
?*?style?utilized?by?this?solution?is?main/subroutine?architectural?style.?We
?*?have?the?following?modules?(functions):
?*?
?*?- Master?Control?(main).?This?function?controls?the?sequencing?among?the
?*?other?four?functions.
?*? - Input.?This?function?reads?the?data?lines?from?the?input?medium?(file)
?*?and?stores?them?in?core?for?processing?by?the?remaining?modules.?The
?*?chracters?are?stored?into?a?character?array?(char[]).?The?blank?space?is?used
?*?to?separate?the?words.?An?index?is?kept?to?show?the?starting?address?of?each
?*?line?in?the?character?array.?The?index?is?stored?as?an?integer?array?(int[]).
?*? - Circular?Shift.?This?function?is?called?after?the?input?function?has
?*?completed?its?work.?It?prepares?an?index?which?gives?the?address?of?the
?*?first?character?of?each?circular?shift?and?the?original?index?of?the?line?in
?*?the?index?array?made?up?by?input?function.?It?leaves?its?output?in?core?with
?*?an?array?of?pairs?(original?line?number?starting?addres).?This?array?is
?*?stored?as?two?dimensional?integer?array?(int[][]).
?*? - Alphabetizing.?This?function?takes?as?input?the?arrays?produced?by?input
?*?and?circular?shift?function.?It?produces?an?array?in?the?same?format
?*?(int[][])?as?that?produced?by?circular?shift?function.?In?this?case?however
?*?the?circular?shifts?are?listed?in?another?order?(alphabetically).
?*? - Output.?This?function?uses?the?array
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-03-22?15:52??KWIC作業\
?????文件??????471040??2014-03-14?19:38??KWIC作業\assignment1-ms.doc
?????文件??????462336??2014-03-16?23:00??KWIC作業\assignment2-oo.doc
?????文件??????455680??2014-03-17?11:23??KWIC作業\Assignment3-es.doc
?????文件??????281088??2014-03-18?21:33??KWIC作業\assignment4-pf.doc
?????文件??????691384??2014-03-18?21:31??KWIC作業\KWIC作業.docx
?????目錄???????????0??2014-03-22?15:51??KWIC作業\源代碼\
?????文件???????12709??2003-08-18?11:14??KWIC作業\源代碼\es_src.zip
?????文件????????5855??2003-08-18?11:18??KWIC作業\源代碼\ms_src.zip
?????文件????????9595??2003-08-18?17:35??KWIC作業\源代碼\oo_src.zip
?????文件????????8991??2003-08-18?17:38??KWIC作業\源代碼\pf_src.zip
?????目錄???????????0??2014-03-18?22:37??KWIC作業\源代碼修改后\
?????目錄???????????0??2014-03-18?22:35??KWIC作業\源代碼修改后\KWIC\
?????文件?????????301??2014-03-14?10:31??KWIC作業\源代碼修改后\KWIC\.classpath
?????文件?????????380??2014-03-14?10:31??KWIC作業\源代碼修改后\KWIC\.project
?????目錄???????????0??2014-03-18?22:35??KWIC作業\源代碼修改后\KWIC\.settings\
?????文件?????????598??2014-03-14?10:31??KWIC作業\源代碼修改后\KWIC\.settings\org.eclipse.jdt.core.prefs
?????目錄???????????0??2014-03-18?22:35??KWIC作業\源代碼修改后\KWIC\bin\
?????目錄???????????0??2014-03-18?22:35??KWIC作業\源代碼修改后\KWIC\bin\kwic\
?????目錄???????????0??2014-03-18?22:35??KWIC作業\源代碼修改后\KWIC\bin\kwic\ms\
?????文件????????5216??2014-03-16?11:32??KWIC作業\源代碼修改后\KWIC\bin\kwic\ms\KWIC.class
?????目錄???????????0??2014-03-18?22:35??KWIC作業\源代碼修改后\KWIC\src\
?????目錄???????????0??2014-03-18?22:35??KWIC作業\源代碼修改后\KWIC\src\kwic\
?????目錄???????????0??2014-03-18?22:35??KWIC作業\源代碼修改后\KWIC\src\kwic\ms\
?????文件???????19532??2014-03-16?11:32??KWIC作業\源代碼修改后\KWIC\src\kwic\ms\KWIC.java
?????目錄???????????0??2014-03-18?22:35??KWIC作業\源代碼修改后\KWIC_es\
?????文件?????????301??2014-03-17?10:16??KWIC作業\源代碼修改后\KWIC_es\.classpath
?????文件?????????383??2014-03-17?10:16??KWIC作業\源代碼修改后\KWIC_es\.project
?????目錄???????????0??2014-03-18?22:35??KWIC作業\源代碼修改后\KWIC_es\.settings\
?????文件?????????598??2014-03-17?10:16??KWIC作業\源代碼修改后\KWIC_es\.settings\org.eclipse.jdt.core.prefs
?????目錄???????????0??2014-03-18?22:35??KWIC作業\源代碼修改后\KWIC_es\bin\
............此處省略77個文件信息
評論
共有 條評論