资源描述:
《java实验4通信1班07陈建君》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、华屮科就丈曇夂华曇協《Java程序设计》实验报告实验四:单词统计与排序专业班级:通信工程2010级1班姓名:—陈建君学号:—100103011107时间:—2013.10.17实验四:单词统计与排序1、实验目的:本实验的目的是让学生学习使用JTextArea和处理DucumentEvent事件。2、实验要求:程序里有两个文木区,当用户在一个文木区屮输入一篇英文短文时,另一个文本区将英文短文中使用的单词按字典序排列,并显示每个单词的使用频率。也就是说,随着输入的变化,另一个文本区不断更新显示的内容。3、程序效果图TheYoungerGen
2、erationIntheTwentyfirstCenturyGoodevening,ladiesandgentlemen.Wealwayssaywearethefuture*・Indeed.Vfe,theyoungergenerationrepresentsmodernknowledge,newconcepts,ambitionandgreatdesireforsuccess.But,haveyoueverthoughtofthisquestion:howcanwebesuccessfulinthe21stcentury,whichis
3、fullofgreatchallengesandfiercecompetitions?Inmyopinion,therearetwoimportantfactors・First,wehavetocatchtheopportunitiesandfacethechallenges.ChinahassuccessfullyenteredtheWorldTradeOrganization,Beijinghaswonthebidforthe2008OlympicGames*"*Ifwewanttobesuccessful.,wehavetosei
4、zetheseopportunities.SAKSandAIDS,environmentalpollution,growingpopulation…Wehavenochoicebuttosolvetheseproblemswithourownhands・Thus,catchingtheopportunitiesandtryingourbesttocopewiththedifficultiesisnecessaryforustosucceedinthe21stcentury.Secondly,wehavetolearntocooperat
5、eandcompete.Lastyear,whenSAKSwasspreadingrapidlyinChina,scientistsallovertheworldcooperatedwitheachotherandpreventedthediseasefromspreadinginashortperiodoftime・Atthesametime,theywerealsocompetingagainsteachothertoseewhocouldconquerthediseasefirst・Bycooperatingandcompethe
6、worlddevelopsdaybyday.Therefore,we,theyoungergeneration,mustknowhowtocooperateandcompete.2008使用了1次,便用频至0・00321543420th使用了1次,使用O0.00321543421st倩用了4次,使曲频奉0.012861736仗使用了眇:,使用01607717against^用了1次,使奉0・003215434aid好吏用了1次,儉用茎・003215434all使用了1次,使用频孚0.003215434also>用了1次,使用^0.003
7、215434alleys使用了1次,使用频圣0.003215434a/nbition使甬-,僮甬颇至0.003215434and冃了15灰用频荤0.048231512are冃了4次,预率0.012861736了3次,频莖0009646302b&c用了1次,使用频奉0・003215434be使用了2次二越频龜卫06430868beijinr
8、W用了-belief便甬71次,jfbelongs次,倦bestbidbutcancatchcatchin;Ladiesandgentlemen,wearestandingattheoutsetofa
9、newcentury,weareatthegateofanewera.Lookingback,the20thcenturyis¢uryofgreatdevelopmentsandremarkable