文件名称:java4
介绍说明--下载内容均来自于网络,请自行研究使用
实验目的:1.使用Java applet 来显示信息。
2.创建并使用方法。
3.使用Math类的方法。
问题描述:一个停车库3小时以内,最低收费为$2.00。如果超过3小时,每小时增加$0.5。
24小时以内,最高收费为$10.00。假定没有车会一次停24小时以上。编写一个applet,计算并显示昨天每个在停车库停车客户的停车费用。应在一个JtextField中输入每个客户的停车时数。程序应显示客户的费用,并计算昨天的收入总额,将结果显示在状态栏中。程序应使用calculateCharges方法来确定每个客户的费用。使用各种值来测试程序。
-Experimental purposes: 1 A Java applet to display information. (2) create and use. (3) use the methods of the Math class. Descr iption of the problem: a garage less than three hours, a minimum charge of $ 2.00. If more than three hours, an increase of $ 0.5 per hour. Less than 24 hours, the maximum fee is $ 10.00. Assume that no vehicles will stop for more than 24 hours. Write an applet, is calculated and displayed yesterday, each cost of parking in the parking garage customers. Each customer parking shall be entered in a JtextField hours. The program should display the cost to the customer, and calculate yesterday' s total revenue, the result is displayed in the status bar. The procedures should to use calculateCharges to determine the cost of each customer. Using a variety of values to test the program.
2.创建并使用方法。
3.使用Math类的方法。
问题描述:一个停车库3小时以内,最低收费为$2.00。如果超过3小时,每小时增加$0.5。
24小时以内,最高收费为$10.00。假定没有车会一次停24小时以上。编写一个applet,计算并显示昨天每个在停车库停车客户的停车费用。应在一个JtextField中输入每个客户的停车时数。程序应显示客户的费用,并计算昨天的收入总额,将结果显示在状态栏中。程序应使用calculateCharges方法来确定每个客户的费用。使用各种值来测试程序。
-Experimental purposes: 1 A Java applet to display information. (2) create and use. (3) use the methods of the Math class. Descr iption of the problem: a garage less than three hours, a minimum charge of $ 2.00. If more than three hours, an increase of $ 0.5 per hour. Less than 24 hours, the maximum fee is $ 10.00. Assume that no vehicles will stop for more than 24 hours. Write an applet, is calculated and displayed yesterday, each cost of parking in the parking garage customers. Each customer parking shall be entered in a JtextField hours. The program should display the cost to the customer, and calculate yesterday' s total revenue, the result is displayed in the status bar. The procedures should to use calculateCharges to determine the cost of each customer. Using a variety of values to test the program.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
java4.doc