标签:des io os java ar for 文件 div sp
在这次作业中,我用了java实现了词频排序程序,
输入规格如下:
Require:
1、搜索路径由命令行参数输入。应为全路径,应为文件夹路径而非具体文件路径,否则程序报错。
2、搜索单词由控制台输入。
Effect:
1、输出格式如PPT,上下文输出时,忽略标点符号。
2、任何输入错误(包括命令行、控制台、文件中的与PPt和ReadMe不符的地方),输出:Input error,程序结束。
3、合法的txt文件内容要求如PPT。
输入样例:
#(命令行参数:D:\test)(我把通用测试用例放在了D盘下)
#(控制台输入如下:)
A
I
key
aaaaaaaaa
输出样例:
Total Files-Number : 81 Total Words-Number : 5110
#(此处输入了 A)
D:\test\subdir1\data11.txt ( 1 ) : escape separatists Related navigation A Friday leaders shifting
D:\test\subdir1\data15.txt ( 1 ) : mapped 47530704 passenger 111781416 A Barack 336838004 unknown events
D:\test\subdir1\data17.txt ( 1 ) : Washington government failed occupying A Ferry died gathered scores
D:\test\subdir1\data27.txt ( 2 ) : other US Belfast monitoring A admits mosque Muddying Gabriel
D:\test\subdir1\data27.txt ( 2 ) : effort working UsPrivacyAccessibility skills A Jindo survivors cities Eurostar
D:\test\subdir1\data29.txt ( 1 ) : Three leave 231804392 Mr A Geneva 258998792 OSCE talks
D:\test\subdir1\data31.txt ( 1 ) : All Marquez words admits A moment holy 220513380
D:\test\subdir1\data34.txt ( 1 ) : file Ban Eaten Losing A round border accident bank
D:\test\subdir1\data5.txt ( 1 ) : 201740385 British Deadly crew A 102554168 children she eagle
D:\test\subdir1\data6.txt ( 1 ) : may Seohae winner Story A sides named 328231470 Cold
D:\test\subdir2\data36.txt ( 1 ) : letter Sport total divisions A Correspondents reveals 397440680 Watch
D:\test\subdir2\data40.txt ( 1 ) : 395318880 acute separatists Catherine A Damaged Witnesses sanctions leave
D:\test\subdir2\data45.txt ( 1 ) : US Step Russian places A MarquezOverflowing rift monitoring Pension
D:\test\subdir2\data46.txt ( 4 ) : keep Belfast swim stated A respond Weibo provoked Ireland
D:\test\subdir2\data46.txt ( 4 ) : either FEATURE crowded German A row leader enduring situation
D:\test\subdir2\data46.txt ( 4 ) : diplomatic two College West A along Obama takeaway ago
D:\test\subdir2\data46.txt ( 4 ) : Putin measures agony speeds A Ukrainian Mobile big 422016792
D:\test\subdir2\data49.txt ( 2 ) : deal life refloat count A Square sailors another Clashes
D:\test\subdir2\data49.txt ( 2 ) : More corruption 632460254 enduring A eagle FEATURE United stated
D:\test\subdir2\data51.txt ( 2 ) : by modernised pair same A from 637932288 Eaten agency
D:\test\subdir2\data51.txt ( 2 ) : John TV groups Maps A authorities two as Orchid
D:\test\subdir2\data52.txt ( 1 ) : compounded States swim Catherine A for rift inside 669824708
D:\test\subdir2\data55.txt ( 1 ) : love 115164059 315001208 two A sanctions Everest Clinton skateboard
D:\test\subdir2\subdir3\data59.txt ( 1 ) : Park operations reveals talks A more One UK leave
D:\test\subdir2\subdir3\data63.txt ( 2 ) : cities 94623870 government 712750738 A Putin 55625559 He Federal
D:\test\subdir2\subdir3\data63.txt ( 2 ) : habits takeaway impose Kiev A island Yonhap car Yonhap
D:\test\subdir2\subdir3\data64.txt ( 2 ) : occupy swim train followed A said corruption Middle followed
D:\test\subdir2\subdir3\data64.txt ( 2 ) : Help travel 49392672 issued A drastic occupy from keep
D:\test\subdir2\subdir3\data69.txt ( 1 ) : dangerous Will Sinking still A Channel on 350471295 statement
D:\test\subdir2\subdir3\data77.txt ( 1 ) : Deshchytsia next dies 553275948 A 727014951 delays 771922704 Lee
D:\test\subdir2\subdir3\data79.txt ( 2 ) : boss Mariupol Eurostar would A clear Related other rock
D:\test\subdir2\subdir3\data79.txt ( 2 ) : our cautiously he where A Secretary operation information Off
#(此处输入了 I)
D:\test\data81.png.txt ( 2 ) : impact Google prepared pagePrint I much 826541470 scores Will
D:\test\data81.png.txt ( 2 ) : Middle 3512311 11296341 America I Ferry explained place technology
D:\test\subdir1\data1.txt ( 2 ) : ships novelist calm Guidelines I riot Federal World unable
D:\test\subdir1\data1.txt ( 2 ) : 97979505 Features was currents I kept different doctors Sanctions
D:\test\subdir1\data13.txt ( 1 ) : Schmidt round Read trade I supporters World within children
D:\test\subdir1\data14.txt ( 2 ) : view were coast guard I mins damage love covers
D:\test\subdir1\data14.txt ( 2 ) : where MSN public still I and East 58786832 car
D:\test\subdir1\data15.txt ( 1 ) : options prays ChoicesCookiesContact Why I Harrowing Bright prays video
D:\test\subdir1\data2.txt ( 1 ) : expose He being 8564920 I tensions UseAbout coast swim
D:\test\subdir1\data20.txt ( 1 ) : then page UK corruption I next covers Latest Kerry
D:\test\subdir1\data21.txt ( 1 ) : disarmed Harrowing 175106176 Lee I fomenting takeaway 533086995 there
D:\test\subdir1\data23.txt ( 1 ) : Orchid sourcesMedia through that I external do score monk
D:\test\subdir1\data24.txt ( 1 ) : Russians Clinton modern military I holy gathered after 11868192
D:\test\subdir1\data29.txt ( 1 ) : unknown though Elsewhere 337478778 I there all have agency
D:\test\subdir1\data6.txt ( 1 ) : Radio Russian feeds unconventional I Eaten access leave problems
D:\test\subdir1\data9.txt ( 1 ) : Mariupol Rates are Stewart I telling Riot On measures
D:\test\subdir2\data37.txt ( 1 ) : Mr officer BBC order I ChoicesCookiesContact special just occupying
D:\test\subdir2\data38.txt ( 1 ) : standoff supporters cranes He I unable went evacuate storiesRSS
D:\test\subdir2\data39.txt ( 1 ) : Mariupol support efforts vehicleMariupol I Top other Crisis cargo
D:\test\subdir2\data40.txt ( 1 ) : aboard novelist guilty All I Watch long 167364861 165221793
D:\test\subdir2\data42.txt ( 2 ) : restore This Living he I search around Yanukovych helm
D:\test\subdir2\data42.txt ( 2 ) : Listen 144270590 us Chelsea I southern Or Salvage News
D:\test\subdir2\data44.txt ( 1 ) : scepticism climb prays boss I 530689104 Jindo packed over
D:\test\subdir2\data49.txt ( 1 ) : Chelsea Popular cautious Mount I ChoicesCookiesContact take delays unconventional
D:\test\subdir2\data50.txt ( 1 ) : agonising walk Survivor Services I still Features ship Sport
D:\test\subdir2\data51.txt ( 1 ) : Irish Losing even Coast I Namyoung Eric gender May
D:\test\subdir2\data52.txt ( 1 ) : place spread officers gathered I Nobel currents News by
D:\test\subdir2\data54.txt ( 1 ) : Connect charge Federal trade I local accident occupy conflicting
D:\test\subdir2\subdir3\data59.txt ( 1 ) : occupying EU Some help I people Thursday air Park
D:\test\subdir2\subdir3\data63.txt ( 1 ) : ASIA 40618775 355920768 believed I continuing annexed GOOGLE Technology
D:\test\subdir2\subdir3\data66.txt ( 1 ) : slopes rescued Losing 7146048 I scores that World score
D:\test\subdir2\subdir3\data67.txt ( 1 ) : bin occupying Connected places I special will rival order
D:\test\subdir2\subdir3\data71.txt ( 1 ) : twins be attempt agony I life Foreign Video in
D:\test\subdir2\subdir3\data73.txt ( 1 ) : story This experts government I Out if UsPrivacyAccessibility followed
D:\test\subdir2\subdir3\data74.txt ( 1 ) : put conditions Secretary S I its place 601178778 told
D:\test\subdir2\subdir3\data77.txt ( 1 ) : Springer impact had just I collision Will Cold CCTV
D:\test\subdir2\subdir3\data78.txt ( 1 ) : avalanche 281823703 Stories captain I people while announces if
D:\test\subdir2\subdir3\data80.txt ( 3 ) : ADVERTISEMENT 105996360 317017932 near I Relatives Deshchytsia Share area
D:\test\subdir2\subdir3\data80.txt ( 3 ) : count showing along expressed I interim under happening officer
D:\test\subdir2\subdir3\data80.txt ( 3 ) : demonstrators allies brought authorities I island Step three Pension
#(此处输入了 key)
D:\test\data81.png.txt ( 1 ) : information key Download way developing The
D:\test\subdir1\data12.txt ( 1 ) : even denies messages College key total OSCE Belfast testimonies
D:\test\subdir1\data16.txt ( 1 ) : It 409818332 nuclear three key 267458922 inside siteTerms brought
D:\test\subdir1\data27.txt ( 2 ) : 9878160 vehicleMariupol 53480592 file key Free 27551879 place Listen
D:\test\subdir1\data27.txt ( 2 ) : 741725420 code Business Copeland key accused are These see
D:\test\subdir1\data29.txt ( 2 ) : Messages Relatives 902671252 of key Anglo unidentified navigation expose
D:\test\subdir1\data29.txt ( 2 ) : Hillary code President Viktor key Share Channel command seized
D:\test\subdir1\data30.txt ( 1 ) : Harrowing compounded options life key expressed pictures Lee 210490310
D:\test\subdir1\data32.txt ( 2 ) : 200422917 eagle Government 357342708 key officer Popular Guide 15689956
D:\test\subdir1\data32.txt ( 2 ) : FEATURE row activists Shop key Sinking winner 53637426 BY
D:\test\subdir1\data4.txt ( 1 ) : 17085508 also Kerry World key economy additional Download room
D:\test\subdir1\data9.txt ( 1 ) : mapped trapped Top enter key hull Canada Russian 12425394
D:\test\subdir2\data38.txt ( 1 ) : conflicting What world security key hr riot ready her
D:\test\subdir2\data42.txt ( 1 ) : reveals actual Vladimir graphic key Connect forces UseAbout around
D:\test\subdir2\data43.txt ( 1 ) : Listen Will sculptures 298886448 key between accident NEW Maps
D:\test\subdir2\data50.txt ( 1 ) : took 21225984 results reports key Messages Messages developing This
D:\test\subdir2\data51.txt ( 2 ) : 16265610 she 46806724 inside key 468746412 Geneva leader life
D:\test\subdir2\data51.txt ( 2 ) : Geneva leader life vehicleMariupol key World 93911572 human of
D:\test\subdir2\data52.txt ( 2 ) : 627066328 Gabriel 233447825 row key major leave 22452790 dead
D:\test\subdir2\data52.txt ( 2 ) : worked sanctions obliged What key brought rift swim 77375000
D:\test\subdir2\data54.txt ( 1 ) : told three kept send key 23155616 border Graphic Chelsea
D:\test\subdir2\subdir3\data59.txt ( 1 ) : culture it page MSN key representative speaking 207114520 winner
D:\test\subdir2\subdir3\data61.txt ( 1 ) : guard 286390104 Federal coast key Step siteTerms followed freighter
D:\test\subdir2\subdir3\data67.txt ( 1 ) : agony their Secretary Korea key 47895625 children cautious Will
D:\test\subdir2\subdir3\data69.txt ( 2 ) : Russian 187107942 for problems key tells measures Muddying responsible
D:\test\subdir2\subdir3\data69.txt ( 2 ) : was Donetsk file Listen key interim why 932654736 245234444
D:\test\subdir2\subdir3\data72.txt ( 1 ) : trapped stricken cautious speeds key Share big logoGerman to
D:\test\subdir2\subdir3\data74.txt ( 1 ) : when Some ActionEditorial as key accused Square numbers representative
D:\test\subdir2\subdir3\data79.txt ( 1 ) : game score rescue period key Get 401324847 Losing CCTV
D:\test\subdir2\subdir3\data80.txt ( 1 ) : now bank quoted Guard key police dead Sinking 9630957
#(此处输入了 aaaaaaaaa)
Input error
标签:des io os java ar for 文件 div sp
原文地址:http://www.cnblogs.com/12061179lyf/p/3992589.html