文件名称:java06
介绍说明--下载内容来自于网络,使用问题请自行百度
实验目的:1.在类中创建新方法。
2.在类的其它方法中调用该方法。
问题描述:修改《Java程序设计教程》中图8.7的Time3类,增加tick
方法,该方法使存储在Time3对象中的时间增加1秒钟。此外,提供增加minute的incrementMinute方法,以及增加hour的incrementHour方法。Time3对象应总是保持一致状态。修改《Java程序设计教程》中图8.8的applet TimeTest4,以测试Time3对象的tick方法、incrementMinute方法和incrementHour方法,以确保他们能正常工作。
-Experimental purposes: 1. Create a new method in the class. Two other methods in the class call the method. Problem Descr iption: to modify the Java programming tutorial in 8.7 Time3 class, increase the tick method, the method Time3 object increased by 1 second. In addition, the increase in the minute incrementMinute, as well as increase the hour of incrementHour methods. The time3 object should always maintain a consistent state. Modify the Java programming tutorial " in Figure 8.8 the applets TimeTest4 of the tick test Time3 object incrementMinute methods and incrementHour of methods to ensure they work properly.
2.在类的其它方法中调用该方法。
问题描述:修改《Java程序设计教程》中图8.7的Time3类,增加tick
方法,该方法使存储在Time3对象中的时间增加1秒钟。此外,提供增加minute的incrementMinute方法,以及增加hour的incrementHour方法。Time3对象应总是保持一致状态。修改《Java程序设计教程》中图8.8的applet TimeTest4,以测试Time3对象的tick方法、incrementMinute方法和incrementHour方法,以确保他们能正常工作。
-Experimental purposes: 1. Create a new method in the class. Two other methods in the class call the method. Problem Descr iption: to modify the Java programming tutorial in 8.7 Time3 class, increase the tick method, the method Time3 object increased by 1 second. In addition, the increase in the minute incrementMinute, as well as increase the hour of incrementHour methods. The time3 object should always maintain a consistent state. Modify the Java programming tutorial " in Figure 8.8 the applets TimeTest4 of the tick test Time3 object incrementMinute methods and incrementHour of methods to ensure they work properly.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
java06.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.