freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

[計算機軟件及應用]全國計算機等級考試jaa二級上機真題40道(參考版)

2025-01-12 07:49本頁面
  

【正文】 本題的要求是: ,完成程序,然后運行并所 得結果為: 對 。 } } 解題思路: Java程序修改如下: 第 1處:定義字符數(shù)組,需填入 new 第 2處:創(chuàng)建文本域?qū)ο?,需填? getChars 第 3處:循環(huán)變量的終值,需填入 第 4處:將字符串緩沖區(qū)里的字符串反向排列,需填入 reverse 3. 綜合應用( 1小題,計 30分) 注意:下面出現(xiàn)的“考生文件夾”均為 %USER% 在考生文件夾中存有文件名為 ,該程序是不完整的,請 在注釋行“ //**********Found**********”下一行語句的下劃線地方填入 正確內(nèi)容, 然 后刪除下劃線,請勿刪除注釋行或改動其他已有語句內(nèi)容。 ( null, output,字符串緩存的字符相關方法示范 , )。 //*********Found********** buf. reverse。 )。 ( 6, 39。您 39。 ++i ) output += charArray[ i ]。 //*********Found********** for ( int i = 0。 //*********Found********** buf. getChars ( 0, (), charArray, 0 )。 String output = buf = + () +\nCharacter at 0: + ( 0 ) + \nCharacter at 4: + ( 4 )。 給定源程序: import .*。請完善 ,并進行調(diào)試, 程序運行的某次結果如下: 由于 ,請在注釋行“ //*********Found*********” 下一行語句的下劃線地方填入正確內(nèi)容,然后刪除下劃線,請勿刪除注釋行 或其他已有語句內(nèi)容。 ( 0 )。 result = x * y * z。 y = ( yVal )。 zVal = (輸入第 3個整數(shù) : )。 //*********Found********** xVal = JOptionPane. showInputDialog (輸入第 1個整數(shù) : )。 public class Java_1{ public static void main( String args[] ){ int x, y, z, result。 存盤時,文件必須存放在考生文件夾下,不得改變原有文件的文件名。 public void windowClosed(WindowEvent e){} public void windowIconified(WindowEvent e){} public void windowDeiconified(WindowEvent e){} public void windowActivated(WindowEvent e){} public void windowDeactivated(WindowEvent e){} } 解題思路: Java程序修改如下: 第 1處:實現(xiàn)接口,需填入 WindowListener 第 2處:創(chuàng)建窗體,需填入 new Frame(Exit test) 第 3處:創(chuàng)建按鈕,需填入 West 第 4處:在窗體上加入按鈕,需填入 East 第 5處:將窗體設為可見,需填入 true 參考源程序: c:\wexam\28990001\hlpsys\參考答案 \ 請把該程序復制到 c:\wexam\28990001中,然后進行編譯和執(zhí)行。 public void windowOpened(WindowEvent e){} public void windowClosing(WindowEvent e) { (0)。 } public void actionPerformed(ActionEvent e) { (0)。 } public static void main(String args[]) { Java_3 fa=new Java_3()。 //為按鈕注冊監(jiān)聽器 (200,200)。 (this)。 (bn,North)。 (bw,West)。 bc=new Button(Exit)。 bs=new Button(South)。 be=new Button(East)。 Button be,bw,bs,bn,bc。 import .*。 程序運行后的界面如圖所示。 存盤時文件必須存放在考生文件夾下,不得改變原有文件的 文件名。 } ()。 j aMatrix[i].length。 i 。 //循環(huán)變量 int j = 0。 運行結果為: 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 給定源程序: public class Java_2 { public static void main(String[] args) { int[][] aMatrix = {{1,1,1,1},{2,2,2,2},{3,3,3,3},{4,4,4,4}}。 存盤時文件必須存放在考生文件夾下,不得改變原有文件的文件名。 ( 0 )。 if( passes 8 ) output = output + \n球隊升級 。 student = student + 1。 if ( result == 1 ) passes = passes + 1。 //輸出字符串 //10個隊員 ,用計數(shù)器控制循環(huán) while ( student = 10 ) { input = (輸入隊員考核結果 (1=及格 ,2=不及格 ) )。 public class Java_1 { public static void main( String args[] ){ //初始化變量 int passes = 0, //考試及格的隊員數(shù) failures = 0, //考試不及格的隊員數(shù) student = 1, //學生計數(shù)器 result。程序要求輸入考核隊員及格否的標記數(shù),如考核及格輸 入 1,否則輸入 2。 存盤時文件必須存放在考生文件夾下,不得改變原有文件的文件名。 //*********Found********** (label)。 //*********Found********** public class Java_3 extends JApplet{ //*********Found********** public void init(){ Container contentPane = getContentPane()。 給定源程序: import .*。請完善 ,并 進行調(diào)試(在命令行中使用 appletviewer ,或者使用集成開 發(fā)環(huán)境),程序顯示小程序的窗口如下: 由于 ,請在注釋行“ //*********Found*********” 下一行語句的下劃線地方填入正確內(nèi)容,然后刪除下劃線,請勿刪除注釋行 或其他已有語句內(nèi)容。 private static final int DEFAULT_SIZE = 12。 private ButtonGroup group。 public static final int DEFAULT_HEIGHT = 200。 //*********Found********** (listener)。 ActionListener listener = new ActionListener(){ //*********Found********** public void actionPerformed(ActionEvent evt){ (new Font(黑體 , , size))。 (button)。 } public void addRadioButton(String name, final int size){ boolean selected = size == DEFAULT_SIZE。 addRadioButton(特大 , 30)。 addRadioButton(中 , 12)。 group = new ButtonGroup()。 (label, )。 ()。 label = new JLabel(熱烈慶祝 Java程序語言開考三周年 )。 setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT)。 //*********Found********** ()。 public class Java_2{ public static void main(String[] args){ RadioButtonFrame frame = new RadioButtonFrame()。 import .*。 存盤時,文件必須存放在考生文件夾下,不得改變原有文件的文件名。 } } 解題思路: Java程序修改如下: 第 1處:創(chuàng)建文本框?qū)ο螅杼钊? JTextArea 第 2處:格式函數(shù),需填入 format 第 3處:顯示信息對話框函數(shù),需填入 showMessageDialog ********************************************************************** 2. 簡單應用( 1小題,計 40分) 注意:下面出現(xiàn)的“考生文件夾”均為 %USER% 在考生文件夾中存有文件名為 。 } //*********Found********** JOptionPane. showMessageDialog (null, outputTextArea, 復合利息 , )。 year++ ) { amount = principal * ( + rate, year )。 for ( int year = 1。 //*********Found********** JTextArea outputTextArea = new JTextArea ( 11, 20 )。 public class Java_1{ public static void main( String args[] ){ double amount, principal = , rate = .05。 import 。 存盤時, 文件必須存放在考生文件夾下,不得改變原有文件的文件名。 } } )。 ( new WindowAdapter() { public void windowClosing( WindowEvent e ){ ().dispose()。 return ( double ) numerator / denominator。 } } // 定義求商的方法,如遇除數(shù)為零時,能拋出異常。 } catch ( NumberFormatException nfe ) { ( this,你必須輸入兩個整數(shù) ,非法數(shù)字格式 , )。 result = quotient( number1, number2 )。 // 空的 JTextField輸出 //*********Found******** try { number1 = ( () )。 } //處理 GUI 事件 public void actionPerformed( ActionEvent e ) { DecimalFormat precision3 = new DecimalFormat( )。 setSize( 425, 100 )。 output = new JTextField()。 ( this )。 input2 = new JTextField( 10 )。 ( input1 )。 ( new JLabel( 輸入分子 , ) )。 Container c = getContentPane()。 private double result。 //*********Found******** public class Java_3 extends JFrame implements ActionListener { private JTextField input1, input2, output。 import .*。 考慮兩種異常: 1) 輸入非數(shù)字除數(shù) 2) 輸入除法分母為零 該程序運行的三種結果狀態(tài)如下: 1) 輸入兩個合法整數(shù): 2) 輸入非數(shù)字除數(shù): 3) 輸入除數(shù)為零: 給定源程序: import 。 存盤時文件必須存放在考生文件夾下,不得改變原有文件的文件名。 \TAB } \TAB ()。 jaMatrix[i].length。 i 。 //循環(huán)變量 \TAB \TAB int j = 0。程序運行結果 如下: 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 給定源程序: public class Java_2{ public static void main(String[] args) { int[][] aMatr
點擊復制文檔內(nèi)容
試題試卷相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1