没有合适的资源?快使用搜索试试~ 我知道了~
背景描述: 在完成面向对象、Swing、线程的课程后,可以开始练习本项目的部署安排。安排本练习的主要目的理解面向对象、能够用面向对象的思路去思考问题,结合Swing和现成的知识完成本项目。
资源推荐
资源详情
资源评论
吃豆豆
一、 背景描述
在完成面向对象、Swing、线程的课程后,可以开始练习本项目的部署安排。安排本
练习的主要目的理解面向对象、能够用面向对象的思路去思考问题,结合 Swing 和现成的
知识完成本项目。
二、 实现要求
使用面向对象的方式,完成本项目。
三、 实现技术
a) 熟练使用 if、for 等语句进行逻辑操作。
b) 分析数据的属性和方法,能够熟练地写出该数据表示的类。
c) 使用 JFrame 创建一个窗体。
d) 掌握 ActionListener 等事件的注册、添加、操作等。
e) 使用 Grahpics 能够绘制一般的图形、根据需要定制自己需要的复杂图形。
四、 类图
a) 类图
Bi gMout hFi shFrame
pool : Fi shPool
mai n( args : St ri ng[ ] ) : stati c voi d
Bi gMout hFi sh
si ze : i nt
di rect i on : i nt
col or : Col or
speed : i nt
eyesi ze : i nt
eyeposx : i nt
eyeposy : i nt
eyecol or : Col or
posx : i nt
posy : i nt
maxmout h : i nt
mout hsi ze : i nt
UP : stati c i nt = 0
RI GHT : stati c i nt = 1
DOWN : stat i c i nt = 2
LEFT : stati c i nt = 3
move( ) : voi d
changeDi r(di r : i nt) : voi d
pai nt (g : Graphi cs2D) : voi d
changeCol or(col or : Col or) : voi d
UpLi stenerI mpl
acti onPerf ormed( e : Acti onEvent ) : voi d
Ri ght Li stenerI mpl
acti onPerf ormed( e : Acti onEvent ) : voi d
DownLi stenerI mpl
acti onPerf ormed( e : Acti onEvent ) : voi d
Lef tLi stenerI mpl
acti onPerf ormed( e : Acti onEvent ) : voi d
Fi shPool
5 sh : Bi gMout hFi sh
bean : Fi shBean
pai nt (g : Graphi cs) : voi d
Ti merLi stenerI mpl
acti onPerf ormed( e : Acti onEvent ) : voi d
内部类
内部类
内部类
内部类
内部类
Fi shBean
posx : i nt
posy : i nt
si ze : i nt
col or : Col or
newPos(w : i nt, h : i nt ) : voi d
pai nt (g : Graphi cs) : voi d
Fi shUt i l i ti es
i sI nteracti on( 5 sh : Bi gMouthFi sh, bean : Fi shBean) : stati c bool ean
b) 类图说明
类名称
BigMouthFishFrame
类描述 大嘴鱼界面类。完成大嘴鱼的界面的绘制。该类继承 JFrame。
包描述
main
函数描述
public static void main(String[] args)
程序的主函数。
BigMouthFishFrame()
构造函数。构造大嘴鱼界面。
类名称
BigMouthFish
资源评论
baidu_23249363
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功