皮皮学,免费搜题
登录
搜题
【简答题】
请使用NetBeans打开考生文件夹下的项目 Java-3, 该项目中的源文件 Java-3.Java 是不完整的,请在注释行“ //**********Found********* ”下一行语句的下划线地方填入正确内容,然后删除下划线,请勿删除注释行或改动其他已有语句内容。存盘时不得改变原有文件的文件名及存放目录。 本题要求:对三处进行填写语句,该程序功能是计算学生的考生分数的平均分的Applet。程序运行结果如下: //DoubleArray.java import java.awt.*; import javax.swing.*; public class Java_3 extends JApplet { int grades[][] = { { 77, 68, 86, 73 }, { 96, 87, 89, 81 }, { 70, 90, 86, 81 } }; int students, exams; String output; JTextArea outputArea; //对实例变量初始化 public void init(){ students = grades.length; exams = grades[ 0 ].length; //*********Found********** outputArea = new ___________________(); Container c = getContentPane(); c.add( outputArea ); //输出 output = "数组是:"; buildString(); output += "\n\n最低分: " + minimum() + "\n最高分: " + maximum() + "\n"; for ( int i = 0; i < students; i++ ) output += "\n学生的平均分" + i + " 组是 " + average( grades[ i ] ); outputArea.setFont( new Font( "Courier", Font.PLAIN, 12 ) ); outputArea.setText( output ); } //找最底分 public int minimum(){ int lowGrade = 100; for ( int i = 0; i < students; i++ ) for ( int j = 0; j < exams; j++ ) if ( grades[ i ][ j ] < lowGrade ) lowGrade = grades[ i ][ j ]; //*********Found********** return __________________; } //找最高分 public int maximum(){ int highGrade = 0; for ( int i = 0; i < students; i++ ) for ( int j = 0; j < exams; j++ ) if ( grades[ i ][ j ] > highGrade ) highGrade = grades[ i ][ j ]; return highGrade; } //对各组学生确定平均分 public double average( int setOfGrades[] ){ int total = 0; for ( int i = 0; i < setOfGrades.length; i++ ) total += setOfGrades[ i ]; //*********Found********** return ( double ) total / ________________________; } //输出格式 public void buildString(){ output += " "; for ( int i = 0; i < exams; i++ ) output += "[" + i + "] "; for ( int i = 0; i < students; i++ ) { output += "\ngrades[" + i + "] "; for ( int j = 0; j < exams; j++ ) output += grades[ i ][ j ] + " "; } } }
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【单选题】---I’m sorry I forget to turn the light off. ---Don’t worry. I have it ____
A.
turn off
B.
turned off
C.
turn on
D.
turned on
【单选题】Don’t worry. I have some_____for you.
A.
advice
B.
ideas
C.
suggestion
D.
opinion
【多选题】下列各项表述中,处理正确的有( )
A.
递延所得税资产的确认应以未来期间很可能取得的应纳税所得额为限
B.
按照税法规定可以结转以后年度的未弥补亏损和税款抵减,应视同可抵扣暂时性差异处理
C.
与直接计入所有者权益的交易或事项相关的可抵扣暂时性差异,相应的递延所得税资产应计入所有者权益
D.
递延所得税资产和递延所得税负债一般应以抵销后的净额列示
【单选题】---Oh, I forgot to bring my pen here. --- Don’t worry. I have two. You can use ______. A. I B. me C. myself D. mine
A.
1
B.
2
C.
3
D.
4
【简答题】Mark: __________________ Lily: Yes, I have. Mark: _________________ Lily: Don’t worry. I have checked them many times. 选项: 1. Lily, don’t forget the Christmas dinner. 2. Don’t forget the Christmas gif...
【简答题】Rewrite the following sentences after the model. Model: Learning new skills is anything but a temporary assignment and you should also get used to the idea. You should also get used to the idea that l...
【单选题】( )即目前尚未显现或明确提出,但在未来可能形成的需要
A.
现实需要
B.
潜在需要
C.
退却需要
D.
不规则需要
【单选题】科研论文中的精华部分是( )。
A.
选题
B.
方法和结果
C.
研究背景
D.
讨论和小结
E.
参考文献
【单选题】科研论文的精华和中心内容是()
A.
前言部分
B.
材料与方法部分
C.
结果部分
D.
讨论部分
【单选题】-Oh. my God! I forgot to bring my pen here. -Don’t worry. I have two. You can use __________.
A.
I
B.
me
C.
myself
D.
mine
相关题目: