文件名称:count
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- 刘*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
编写Java 代码实现一个计数器类Counter,其中包含:
域counterValue 用来保存计数器的当前数值;
方法increment() 计数器加1;
方法decrement() 计数器减1;
方法reset() 清零;
思考:这个类应该定义几个构造函数?为什么?
利用该计数器类,编写一测试类,用以管理会议室投影仪的出借情况。每新购入一台投影仪或收回一台投影仪,计数器加1;每淘汰一台投影仪或借出一台投影仪,计数器减 1。-Write Java code to achieve a counter class Counter, which includes: the domain counterValue used to save the current value of the counter method increment () counter is incremented by 1 method decrement () the counter is decremented by one method reset () clear thinking: This category should be defining several constructor? Why? The counter class, write a test class to manage the conference room projector lending situation. Each new purchase of a projector or withdraw a projector, the counter is incremented out of a projector, or lend a projector, the counter is decremented by 1.
域counterValue 用来保存计数器的当前数值;
方法increment() 计数器加1;
方法decrement() 计数器减1;
方法reset() 清零;
思考:这个类应该定义几个构造函数?为什么?
利用该计数器类,编写一测试类,用以管理会议室投影仪的出借情况。每新购入一台投影仪或收回一台投影仪,计数器加1;每淘汰一台投影仪或借出一台投影仪,计数器减 1。-Write Java code to achieve a counter class Counter, which includes: the domain counterValue used to save the current value of the counter method increment () counter is incremented by 1 method decrement () the counter is decremented by one method reset () clear thinking: This category should be defining several constructor? Why? The counter class, write a test class to manage the conference room projector lending situation. Each new purchase of a projector or withdraw a projector, the counter is incremented out of a projector, or lend a projector, the counter is decremented by 1.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Coun.java