文件名称:quest4
-
所属分类:
- 标签属性:
- 上传时间:2014-05-15
-
文件大小:581byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
一个Java程序
• 时间(24小时时钟)噪声读数(您可能假设
用户输入一个整数范围在(0 . .23)
• 噪音分贝的音量(你可以假定用户将进入一个
整数范围在(0 . .200)
你的程序需要计算是否应该征收罚款,罚款的金额应该是什么。然后程序打印出罚款。
罚款的数量决定的
时间产生的噪声,噪声的响度。噪声在睡觉
时间(看作是10点或之后但在6点之前)被认为更严重
噪音在其他时间。睡眠时间以外,声音比90分贝噪音会增加
100美元的罚款。在睡觉期间,利率的有两种:如果噪音从70到
110分贝,罚款200美元,但如果是110分贝或更响亮,罚款300美元。
-Write a Java program called quest3.java that prompts for and reads in two integer
values:
• The hour (on a 24 hour clock) a noise reading is taken (you may assume the
user will enter an integer in the range 0..23, inclusive)
• The loudness of the noise in decibels (you may assume the user will enter an
integer in the range 0..200, inclusive)
Your program needs to calculate if a fine should be levied against the producers of the
noise, and what the amount of the fine should be. The program then prints out the fine.
The rules for determining the fine are as follows. The amount of a fine depends of the
time the noise was produced, and the loudness of the noise. Noise during sleeping
time (regarded as being 10pm or later but before 6am) is regarded more seriously than
noise at other times. Outside of sleeping time, a noise louder than 90 decibels incurs a
$100 fine. During sleeping time, there are two rates of fine: if the noise is from 70 up
to 110 decibels, the f
• 时间(24小时时钟)噪声读数(您可能假设
用户输入一个整数范围在(0 . .23)
• 噪音分贝的音量(你可以假定用户将进入一个
整数范围在(0 . .200)
你的程序需要计算是否应该征收罚款,罚款的金额应该是什么。然后程序打印出罚款。
罚款的数量决定的
时间产生的噪声,噪声的响度。噪声在睡觉
时间(看作是10点或之后但在6点之前)被认为更严重
噪音在其他时间。睡眠时间以外,声音比90分贝噪音会增加
100美元的罚款。在睡觉期间,利率的有两种:如果噪音从70到
110分贝,罚款200美元,但如果是110分贝或更响亮,罚款300美元。
-Write a Java program called quest3.java that prompts for and reads in two integer
values:
• The hour (on a 24 hour clock) a noise reading is taken (you may assume the
user will enter an integer in the range 0..23, inclusive)
• The loudness of the noise in decibels (you may assume the user will enter an
integer in the range 0..200, inclusive)
Your program needs to calculate if a fine should be levied against the producers of the
noise, and what the amount of the fine should be. The program then prints out the fine.
The rules for determining the fine are as follows. The amount of a fine depends of the
time the noise was produced, and the loudness of the noise. Noise during sleeping
time (regarded as being 10pm or later but before 6am) is regarded more seriously than
noise at other times. Outside of sleeping time, a noise louder than 90 decibels incurs a
$100 fine. During sleeping time, there are two rates of fine: if the noise is from 70 up
to 110 decibels, the f
(系统自动生成,下载前可以参看下载内容)
下载文件列表
quest4.java
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.