基于Java的哈夫曼编码译码系统 报告.docx

上传人:b****3 文档编号:3686356 上传时间:2022-11-24 格式:DOCX 页数:14 大小:261.85KB
下载 相关 举报
基于Java的哈夫曼编码译码系统 报告.docx_第1页
第1页 / 共14页
基于Java的哈夫曼编码译码系统 报告.docx_第2页
第2页 / 共14页
基于Java的哈夫曼编码译码系统 报告.docx_第3页
第3页 / 共14页
基于Java的哈夫曼编码译码系统 报告.docx_第4页
第4页 / 共14页
基于Java的哈夫曼编码译码系统 报告.docx_第5页
第5页 / 共14页
点击查看更多>>
下载资源
资源描述

基于Java的哈夫曼编码译码系统 报告.docx

《基于Java的哈夫曼编码译码系统 报告.docx》由会员分享,可在线阅读,更多相关《基于Java的哈夫曼编码译码系统 报告.docx(14页珍藏版)》请在冰豆网上搜索。

基于Java的哈夫曼编码译码系统 报告.docx

基于Java的哈夫曼编码译码系统报告

课程设计

课程名称Java与面向对象程序设计

课程设计

题目名称_基于Java的哈夫曼编码译码系统

学生学院自动化学院____

专业班级______网络三班____________

姓名:

__________曾庆伟____________学号________31080001332__________

指导教师________张钢____________

 

2011年6月10日

目录

1.问题描述和分工情况

1.1问题描述

使用Java语言实现哈夫曼算法,对英文文章进行编码和译码。

输入输出界面要求使用Web页面,用JSP实现。

1.2分工情况

组长:

曾庆伟

在本课程设计是负责如下工作:

1,环境的搭建(主要是web服务器的搭建)

2,代码编写工作,实现本课程设计的主要功能,即对英文的编码以及译码。

3,主要的界面设计,主要是设计jsp的界面

组员1:

徐华涛王锦贤周基霖

1,主要负责上网搜索26个英文字母在文章中出现的概率,并且根据哈夫曼算法设计出

26个字母对应的编码。

……2,画出设计的编码图…

2.系统总体设计

2.1系统设计方案综述

设计方案:

这个课程设计就是围绕着吧哈夫曼编码体现出来的目的做的

第一步是把在输入框中的字符串——也就是需要编码的文章转成01的字符串。

这里我设计成可以显示出来01字符串

第二步,在本地,也就是输入框那个jsp页面吧他的类型转成byte,这样就真正实现了他的目的——传送的时候能节省流量。

2.2系统模块设计

没什么模块的,就是一整体实现那功能。

2.3数据库设计

无数据库

2.4系统功能设计

就是简单的传送文件

2.5界面设计

很简单的黄绿两种颜色:

2.6开发环境描述

开发环境是在MacromediaDreamweaver8上进行的。

主要是因为这个课程设计的要求比较简单,还有因为方便设计界面,.

3.系统详细设计

3.1网上搜索资料abc26个英文字母出现概率

E-0.1268

T-0.0978

A-0.0788

O-0.0776

I-0.0707

N-0.0706

S-0.0634

R-0.0594

H-0.0573

L-0.0394

D-0.0389

U-0.0280

C-0.0268

F-0.0256

M-0.0244

W-0.0214

Y-0.0202

G-0.0187

P-0.0186

B-0.0156

V-0.0102

K-0.0060

X-0.0016

J-0.0010

Q-0.0009

Z-0.0006

3.2画哈夫曼编码图为(加入了字符,。

等等)

3.3转成编码为:

'a':

"0010"

'b':

"010010"

'c':

"111100"

'd':

"01000"

'e':

"110"

'f':

"101111"

'g':

"000010"

'h':

"111110"

'i':

"1110"

'j':

"1011001110"

'k':

"10110010"

'l':

"00000"

'n':

"1010"

'm':

"101110"

'o':

"011"

'p':

"010011"

'q':

"10110011111"

'r':

"0101"

's':

"0001"

't':

"1000"

'u':

"111101"

'v':

"1011000"

'w':

"101101000"

'x':

"101100110"

'y':

"000011"

'z':

"10110011110"

'':

"00110000"

',',"001111"

'.',"001110"

'\'':

"001100011"

'!

':

"00110010"

'-':

"00110011"

'(':

"0011010"

'':

"0011011"

3.4系统主要函数及其功能描述

3.5核心代码片段描述和注释

4.系统部署

4.1开发环境的建立

开发环境:

Web服务器用的是Apache

编写代码的工具:

Dreamweaver8

4.2系统运行环境的建立

运行的操作系统是windowsXP

浏览器是用IE8

4.3系统的部署和运行

5.系统测试和运行效果

5.1系统运行主要界面及其功能说明

在这个输入框中输入要编码的文章。

然后点击转成哈夫曼编码按钮即可。

5.2系统测试数据描述

输入测试文章为:

ChristmascelebrationsintheWesttoday

FromNovemberonwards,itisimpossibletoforgetthatChristmasiscoming.Colouredlightsdecoratemanytowncentresandshops,alongwithshinydecorations,andartificialsnowpaintedonshopwindows.

Instreetsandshops,'Christmastrees'(realorplasticevergreen'conifer'trees)willalsobedecoratedwithlightsandChristmasornaments.

ShoppingcentresbecomebusierasDecemberapproachesandoftenstayopentilllate.ShoppingcentrespeakersystemssystemswillplayChristmas'carols'-thetraditionalChristmasChristiansongs,andgroupsofpeoplewilloftensingcarolsonthestreetstoraisemoneyforcharity.MostplacesofworkwillholdashortChristmaspartyaboutaweekbeforeChristmas.AlthoughtraditionalChristmasfoodsmaybeeaten,drink(andplentyofit)meansthatlittleworkwillbedoneaftertheparty!

Bymid-December,mosthomeswillalsobedecoratedwithChristmastrees,colouredlightsandpaperorplasticdecorationsaroundtherooms.Thesedays,manymorepeoplealsodecorategardentreesorhousewallswithcolouredelectriclights,ahabitwhichhaslongbeenpopularinUSA.

Inmanycountries,mostpeoplepostChristmasgreetingcardstotheirfriendsandfamily,andthesecardswillbehungonthewallsoftheirhomes.InUKthisyear,theBritishPostOfficeexpectstohandleover100millioncardsEACHDAY,inthethreeweeksbeforeChristmas.

Christmascards

ThecustomofsendingChristmascardsstartedinBritainin1840whenthefirst'PennyPost'publicpostaldeliveriesbegan.(Helpedbythenewrailwaysystem,thepublicpostalservicewasthe19thcentury'scommunicationrevolution,justasemailisforustoday.)Asprintingmethodsimproved,Christmascardswereproducedinlargenumbersfromabout1860.TheybecameevenmorepopularinBritainwhenacardcouldbepostedinanunsealedenvelopeforonehalf-penny-halfthepriceofanordinaryletter.

Traditionally,Christmascardsshowedreligiouspictures-Mary,JosephandbabyJesus,orotherpartsoftheChristmasstory.Today,picturesareoftenjokes,winterpictures,FatherChristmas,orromanticscenesoflifeinpasttimes.

 

5.3系统运行和测试结果

运行的结果显示为:

111100*********11110000110001011100010000100110000111100110000001100100100101001010001110011101000010011000011101010001100001000111110110001100001011010001100001100000110000100001101000001000001100110000001100010010111101010111011100011000010100111011000110101110010010110010100110000011101010110100000100101010000001001111001100001110100000110000111000010011000011101011100100110110001000111100100100000011000110000100001100110000101111011010100001011010000011000010001111100010100000110000111100111110010111100001100010111000100001001100001110000100110000111100011101110111010100000100011100011000011110001100000011111101010111001000001100000000011100000101111101000000100110000010001101111000110101001010001100011000010111000101010000011001100001000011101101000101000110000111100110101010000101110000100110000001010100100000110000000111111001101001100010011110011000000100000001110100000100011000010110100011101000111110001100000001111110111010100000110011000001000110111100011010100101000111001110100001001111001100000010101001000001100000010010110001110101111111011110011100010000000011000000011010011101101000001100000100110010111010101000110010000011000001110100011000000011111100110100110011000010110100011101010010000111011010000001001110001100000011000100001100010011101010001100000001100001011101101000000100110000001010100100000110000000111111001101001100010011110011000000110001111110011111001011110000110001011100010000100110000100001011101100001001100011001100000011010010111000100000000110000011010100110000010011000000010000110001110111100001100001101011000110010100001001011101101010001100000011000111111000111010111010111111001010011000110011000010000101110110000100110110011000010110100011100000000000001100000010000000001011001100000100101100011000001000110111100011010100101000110010000011000010110100011101000111110001100000000011100000101111101000000100110000001010100100000110000111100111110010111100001100010111000100001001100000110101101000101011101101010100000010011100011000000110001000011000000110000001100010000011111100110100110100111110101000001000110000111100110101010000101110000100110000010010110111100011101110110001100000100101111010001111011001010011000000100001001100000100011011110011010111001001011001010011000000100100110100110101011001011110011111011000010011000000101010010000011000001110111110001101010001100000001100000100000110011000001101001111010100011000010001110000000000000110000000000010100011000111000011111100110100110100111110101000001000110000111100110101010000101110001100000001010011110001010110010110010100110000000100001100011000110101110000100110000000100001100011000110101110000100110000101101000111000000000000011000001001100000001000001100110000111100111110010111100001100010111000100001001100000011000111111000010010101100000000100110001100110000001100110011000010001111101100011000010000101001001000111010001110011101000100000000110000111100111110010111100001100010111000100001001100001111001111100101111000011000111000101010001100000001011101000001000010011110011000000101010010000011000000001001010111111010100110001001100000111011110011000001001111001101001100000110001100001011010001110000000000000110000011101111100011010100011000000011110101000001000110000111100001001010110000000010011000001110100011000010001111101100011000000011000010111011010000001001100001000011001100000101001011100001110001100001011100111010110000011001100001011110110101001100001111001111100010010111101000000011001110001100001011100110001100000110000010011000000010111100110000100110000011101111001100001011010000110101101100100011000010110100011100000000000001100001111100110000001000001100000010001100000001111110011010110000011000011110011111001011110000110001011100010000100110000010011001001011000000011001100000010010010011111101100000110000001000110000101101000110110101100100011000001001011010111101101011100011000011110011111001011110000110001011100010000100111000110000001000000100011111001111110100001011111000110000100001010010010001110100011100111010001000000001100001111001111100101111000011000101110001000010011000010111101101101000000100110000101110001000001100110000010010110001100001100010100011010100011110011000001000010111101010101100100011000000110100010101001000001100000100110000011010101000000011001100000111011110011000011101000001101100110000101110110001010100001001100001000111110001010000011000000000111010001000000001100011000010110100001101011011001000110000101101000111000000000000011000001001011000110000010000111010110001100000010101111100011001010011000010001111101100011000001001100100101100000001100110010001100000011000100010010000011001100001011101110010000011001101000110111100110101110010010110010100111100110000101110011000110000011000011111001110111011000010011000010110100011100000000000001100000010000000001011001100000100101100011000001000110111100011010100101000110010000011000010110100011101000111110001100001111001111100101111000011000101110001000010*********10000000100001100011000110101110001111001100001000111110110001100000100111111010100100000011101111000011000001001101100011000001000000001100000001110010110110001110111100110001100001011010000010000100110000100011111011000110000111111101101111101000111110001100001111001101010100011110101010000110011000110001001100001111000111011101011101111011010111011110000101000111001110100011000001011101011000011000001111011000111001110100011110011000010110011101111010001100000110000001000010011000011010111000101110000000011000011100001001100001011110110101001100001111010001001100001000011010000010000011001110001101100110000001000010011000001001101011110101010001110101000

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技 > 能源化工

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1