首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 编写程序计算三门课的平均成绩,要求应用程序分别用Java语言三种不同的循环语句实现,每门课的成绩用Math类的random()方法随机产生(random()产生...

编写程序计算三门课的平均成绩,要求应用程序分别用Java语言三种不同的循环语句实现,每门课的成绩用Math类的random()方法随机产生(random()产生...

资 源 简 介

编写程序计算三门课的平均成绩,要求应用程序分别用Java语言三种不同的循环语句实现,每门课的成绩用Math类的random()方法随机产生(random()产生的数值在0和1之间),成绩范围为40~100。 提示:自定义一个类,该类实现一个返回随机数的函数。在main函数里测试时直接调用该类的获取随机数方法。 获得随机数相关的类为:java.lang.Math 需要时可引入该类即:import java.lang.Math -Write a program grade point average calculation of three lessons to require the application were used Java language in three different loop realization of the achievements of each course with the Math class, random () method of randomly generated (random () produces values between 0 and between 1), results range from 40 ~ 100. Tip: Customize a class that implements a function to return random numbers. In the main function, where the test is called the class to obtain a direct method of random numbers. Obtain a random number associated category: java.lang.Math necessary for the introduction of the class that is: import java.lang.Math

文 件 列 表

AVERAGE
.classpath
.project
Average.class
Average.java
point.class
point.java
sss.class
sss.java
sss1.class
sss1.java
sss2.class
sss2.java
VIP VIP
0.207033s