文件名称:quest4

  • 所属分类:
  • JSP源码/Java
  • 资源属性:
  • [Java] [源码]
  • 上传时间:
  • 2014-05-15
  • 文件大小:
  • 1kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • et***
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

一个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
(系统自动生成,下载前可以参看下载内容)

下载文件列表





quest4.java

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org