九九热最新网址,777奇米四色米奇影院在线播放,国产精品18久久久久久久久久,中文有码视频,亚洲一区在线免费观看,国产91精品在线,婷婷丁香六月天

歡迎來到裝配圖網(wǎng)! | 幫助中心 裝配圖網(wǎng)zhuangpeitu.com!
裝配圖網(wǎng)
ImageVerifierCode 換一換
首頁 裝配圖網(wǎng) > 資源分類 > DOC文檔下載  

學(xué)生管理系統(tǒng)-java課程設(shè)計(jì).doc

  • 資源ID:116448590       資源大?。?span id="24d9guoke414" class="font-tahoma">742.01KB        全文頁數(shù):45頁
  • 資源格式: DOC        下載積分:20積分
快捷下載 游客一鍵下載
會(huì)員登錄下載
微信登錄下載
三方登錄下載: 微信開放平臺(tái)登錄 支付寶登錄   QQ登錄   微博登錄  
二維碼
微信掃一掃登錄
下載資源需要20積分
郵箱/手機(jī):
溫馨提示:
用戶名和密碼都是您填寫的郵箱或者手機(jī)號(hào),方便查詢和重復(fù)下載(系統(tǒng)自動(dòng)生成)
支付方式: 支付寶    微信支付   
驗(yàn)證碼:   換一換

 
賬號(hào):
密碼:
驗(yàn)證碼:   換一換
  忘記密碼?
    
友情提示
2、PDF文件下載后,可能會(huì)被瀏覽器默認(rèn)打開,此種情況可以點(diǎn)擊瀏覽器菜單,保存網(wǎng)頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請(qǐng)使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站資源下載后的文檔和圖紙-無水印,預(yù)覽文檔經(jīng)過壓縮,下載后原文更清晰。
5、試題試卷類文檔,如果標(biāo)題沒有明確說明有答案則都視為沒有答案,請(qǐng)知曉。

學(xué)生管理系統(tǒng)-java課程設(shè)計(jì).doc

Java程序設(shè)計(jì)課程期末作業(yè)題 目 學(xué)生成績(jī)管理系統(tǒng) 學(xué) 院 信息科學(xué)與工程學(xué)院專 業(yè) 計(jì)算機(jī)科學(xué)與技術(shù) 班 別 09級(jí)3班 學(xué) 號(hào) 200901051624 姓 名 2011年12月17日目錄一、課程題目:3二、軟件的功能描述3三、系統(tǒng)的UML類圖4(一)用況圖4(二)類之間的圖4(三)數(shù)據(jù)流程圖6四、功能調(diào)試6五、具體代碼15一、課程題目:設(shè)計(jì)一個(gè)學(xué)生Java成績(jī)管理系統(tǒng)(可以不使用界面;如果使用,則界面使用AWT或SWING),要求:a) 增添、刪除、修改學(xué)生基本信息(基本信息包含學(xué)生的學(xué)號(hào)、姓名、專業(yè)分?jǐn)?shù)等信息);b) 計(jì)算每門課的平均成績(jī);c) 統(tǒng)計(jì)優(yōu)秀、良好、中等、及格、不及格的人數(shù)百分比,并以柱狀圖、餅圖呈現(xiàn)【說明:可以使用SWING、AWT自己繪制;也可以使用開源類庫,如JFreeChar】d) 按學(xué)號(hào)查詢學(xué)生及成績(jī);e) 按照成績(jī)分?jǐn)?shù)排序二、軟件的功能描述1, 能夠?qū)崿F(xiàn)學(xué)生信息的增刪改查四項(xiàng)基本的操作。此程序允許出現(xiàn)重名的現(xiàn)象出現(xiàn),另外在刪除的時(shí)候提供了刪除所有重名同學(xué)的信息和刪除指定學(xué)號(hào)的學(xué)生的兩種方法,更加貼近現(xiàn)實(shí)。2, 能夠?qū)⒊绦蛑械臄?shù)據(jù)存儲(chǔ)到data.txt文件中,另外能在程序中通過Swing中的table組件將文件中的內(nèi)容進(jìn)行打印出來??梢灾庇^的看到文件內(nèi)部的結(jié)果。3, 此程序給出了“按照學(xué)號(hào)排序”“按照平均成績(jī)排序”“按照英語成績(jī)排序”“按照數(shù)學(xué)成績(jī)排序”“按照專業(yè)成績(jī)排序”等五個(gè)排序方法。4, 此程序在查詢的同時(shí)又能同時(shí)顯示出三科成績(jī)的餅圖分布,餅圖上標(biāo)出了四個(gè)成績(jī)段的人數(shù)和百分比。更加方便直觀的體現(xiàn)出了單科的成績(jī)分布。5, 程序有一個(gè)增加的功能。能夠?qū)⑺型瑢W(xué)的信息用三維柱狀圖的形式全部呈現(xiàn)出來,能夠進(jìn)行縱向、橫向兩種比較方式。方便人性化的進(jìn)行成績(jī)的比較。三、系統(tǒng)的UML類圖(一)用況圖(二)類之間的圖student類 sort類(三)數(shù)據(jù)流程圖四、功能調(diào)試1,主界面2,新建學(xué)生信息3,查詢成績(jī)頁面4,修改成績(jī)5,刪除成績(jī)第二種方法6, 打印文件內(nèi)容7, 三科的排序8, 平均成績(jī)排序:9,三科的餅圖分布10,所有同學(xué)的成績(jī)?nèi)S柱狀圖分析五、具體代碼1,主界面代碼(Grade.java)public class Grade / 定義主框架private JFrame frame = new JFrame(學(xué)生成績(jī)管理系統(tǒng));/ 定義菜單欄private JMenuBar Bar = new JMenuBar();/ 定義菜單private JMenu JMedit = new JMenu(編輯);private JMenu JMcount = new JMenu(統(tǒng)計(jì));private JMenu JMhelp = new JMenu(數(shù)據(jù));/ 定義菜單項(xiàng)private JMenuItem JMIcreate = new JMenuItem(新建);private JMenuItem JMImodify = new JMenuItem(修改);private JMenuItem JMIsearch = new JMenuItem(尋找);private JMenuItem JMIdelete = new JMenuItem(刪除);private JMenuItem JMIall = new JMenuItem(成績(jī)排序);private JMenuItem JMIgraphics = new JMenuItem(圖形統(tǒng)計(jì));private JMenuItem JMIhelp = new JMenuItem(文件信息);/ 定義文本標(biāo)簽private JLabel text = new JLabel();private JLabel text1 = new JLabel();private JLabel text2 = new JLabel();private JLabel text3 = new JLabel();private JLabel text4 = new JLabel();/ 定義面板private Container con = frame.getContentPane();/ 定義輸入框?qū)ο? private StudentManager inputinfo =null;/ 定義查詢框架對(duì)象private Search search = null;private Create create = null;private Delete delete = null;private Modify modify = null;private Datasort sort = null;private BarCharts ss = null;/ 定義總分統(tǒng)計(jì)對(duì)象/ private AllgradeCount all = null;/ 定義個(gè)人統(tǒng)計(jì)對(duì)象/ private SignalCount signal = null;/ 構(gòu)造函數(shù)public Grade() / 把菜單欄加入框架frame.setJMenuBar(Bar);/ 把菜單加入菜單欄Bar.add(JMedit);Bar.add(JMcount);Bar.add(JMhelp);/ 把菜單項(xiàng)加入菜單JMedit.add(JMIcreate);JMedit.addSeparator();JMedit.add(JMIsearch);JMedit.addSeparator();JMedit.add(JMImodify);JMedit.addSeparator();JMedit.add(JMIdelete);/ 第一個(gè)下拉菜單JMcount.add(JMIall);JMcount.addSeparator();JMcount.add(JMIgraphics);/ 第二個(gè)下拉JMhelp.add(JMIhelp);/ 第三個(gè)/ 設(shè)置文本界面text.setText(=基于TXT文件的Java學(xué)生管理系統(tǒng)=);text1.setText(1.增添、刪除、修改學(xué)生基本信息;并計(jì)算每門課的平均成績(jī););text2.setText(2.統(tǒng)計(jì)優(yōu)秀、良好、中等、及格、不及格的百分比,并以圖呈現(xiàn));text3.setText(3.按學(xué)號(hào)查詢學(xué)生及成績(jī),并按照不同的成績(jī)分?jǐn)?shù)排序。);text4.setText(=制作者,計(jì)算機(jī)09-3,王繼重=);/ 設(shè)置歡迎界面con.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 10);con.add(text);con.add(text1);con.add(text2);con.add(text3);con.add(text4);/ 設(shè)置框架frame.setLocation(200, 200);frame.setSize(400, 300);frame.setVisible(true);frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);/ 增加監(jiān)聽器JMIcreate.addActionListener(new ActionListener() public void actionPerformed(ActionEvent arg0) / TODO 自動(dòng)生成方法存根create = new Create(););JMIsearch.addActionListener(new ActionListener() public void actionPerformed(ActionEvent arg0) search = new Search(););JMImodify.addActionListener(new ActionListener() public void actionPerformed(ActionEvent arg0) modify = new Modify(););JMIdelete.addActionListener(new ActionListener() public void actionPerformed(ActionEvent arg0) delete = new Delete(););JMIall.addActionListener(new ActionListener() public void actionPerformed(ActionEvent arg0) sort = new Datasort(););JMIgraphics.addActionListener(new ActionListener() public void actionPerformed(ActionEvent arg0) ss= new BarCharts(成績(jī)分布柱狀圖););JMIhelp.addActionListener(new ActionListener() public void actionPerformed(ActionEvent arg0) / TODO 自動(dòng)生成方法存根/ JOptionPane.showMessageDialog(null, 計(jì)算機(jī)09-3 王繼重);Outfile a = new Outfile(););public static void main(String args) Grade a = new Grade();2,新建用戶的代碼public class Create extends JFrame /* * 當(dāng)前容器 */Container currentContainer = this;/* * 存儲(chǔ)的文件名 */String fileName = new String(data.txt);/* * 顯示標(biāo)題文本 */JLabel titleLabel = new JLabel(添加成績(jī)界面);/* * 標(biāo)題面板 */JPanel titlePanel = new JPanel();/* * 顯示姓名文本 */JLabel nameLabel = new JLabel(學(xué)生姓名);/* * 顯示成績(jī)文本 */JLabel scoreLabel = new JLabel(學(xué)生學(xué)號(hào));JLabel score1Label = new JLabel(英語成績(jī));JLabel score2Label = new JLabel(數(shù)學(xué)成績(jī));JLabel score3Label = new JLabel(專業(yè)成績(jī));/* * 姓名文本框 */JTextField nameTextField = new JTextField(15);/* * 成績(jī)文本框 */JTextField scoreTextField = new JTextField(15);JTextField score1TextField = new JTextField(15);JTextField score2TextField = new JTextField(15);JTextField score3TextField = new JTextField(15);/* * 輸入面板 */JPanel inputPanel = new JPanel();/* * 添加按鈕 */JButton insertBtn = new JButton(新建);/* * 管理面板 */JPanel managePanel = new JPanel();/* * 按鈕監(jiān)聽器 */ButtonActionListener btnAction = new ButtonActionListener();/* * 構(gòu)造器:初始化窗體 */public Create() this.setSize(280, 300);this.setLocation(300, 300);this.setResizable(false);this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);this.setTitle(java學(xué)生成績(jī)管理系統(tǒng));/* * 將窗體劃分為上中下三個(gè)塊 */this.setLayout(new BorderLayout();this.add(titlePanel, North);this.add(inputPanel, Center);this.add(managePanel, South);/* * 第一塊用來放標(biāo)題面板 = = */titlePanel.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 10);titlePanel.add(titleLabel);titleLabel.setFont(new Font(黑體, Font.PLAIN, 16);/* * 第二塊放輸入面板 */inputPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 10);inputPanel.add(nameLabel);/ 姓名inputPanel.add(nameTextField);inputPanel.add(scoreLabel);/ 成績(jī)inputPanel.add(scoreTextField);/ ?inputPanel.add(score1Label);/ 成績(jī)1inputPanel.add(score1TextField);/ ?inputPanel.add(score2Label);/ 成績(jī)2inputPanel.add(score2TextField);/ ?inputPanel.add(score3Label);/ 成績(jī)3inputPanel.add(score3TextField);/ ?/* * 第三塊是管理面板 */managePanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 10);managePanel.add(insertBtn);/* * 為按鈕注冊(cè)按鈕監(jiān)聽器 */insertBtn.addActionListener(btnAction);/* * 顯示窗體 */this.setVisible(true);/* * 按鈕監(jiān)聽類 */class ButtonActionListener implements ActionListener public void actionPerformed(ActionEvent e) /* * 檢查是否輸入了姓名 */String name = nameTextField.getText().trim();if (name.length() = 0) JOptionPane.showMessageDialog(currentContainer, 輸入的姓名為空!,操作失敗, JOptionPane.ERROR_MESSAGE);return;/* * 是否要求查詢 */int score = 0;int score1 = 0;int score2 = 0;int score3 = 0;/* * 檢查是否輸入了成績(jī),輸入不同的成績(jī) */try score = Integer.parseInt(scoreTextField.getText().trim(); catch (Exception e1) JOptionPane.showMessageDialog(currentContainer, 輸入的成績(jī)不是數(shù)字!,操作失敗, JOptionPane.ERROR_MESSAGE);return;try score1 = Integer.parseInt(score1TextField.getText().trim(); catch (Exception e1) JOptionPane.showMessageDialog(currentContainer, 輸入的成績(jī)不是數(shù)字!,操作失敗, JOptionPane.ERROR_MESSAGE);return;try score2 = Integer.parseInt(score2TextField.getText().trim(); catch (Exception e1) JOptionPane.showMessageDialog(currentContainer, 輸入的成績(jī)不是數(shù)字!,操作失敗, JOptionPane.ERROR_MESSAGE);return;try score3 = Integer.parseInt(score3TextField.getText().trim(); catch (Exception e1) JOptionPane.showMessageDialog(currentContainer, 輸入的成績(jī)不是數(shù)字!,操作失敗, JOptionPane.ERROR_MESSAGE);return;/* * 是否要求錄入 */if (e.getSource() = insertBtn) boolean flag = insert(name, score, score1, score2, score3); / 執(zhí)行方法,進(jìn)行錄入操作if (flag) JOptionPane.showMessageDialog(currentContainer, 錄入成功!);scoreTextField.setText(); / 清空成績(jī)框score1TextField.setText();score2TextField.setText();score3TextField.setText(); else JOptionPane.showMessageDialog(currentContainer,錄入過程中出現(xiàn)了異常,請(qǐng)聯(lián)絡(luò)技術(shù)人員!, 錄入失敗,JOptionPane.ERROR_MESSAGE);return;/* * 插入新記錄 * * param name * 姓名 * param score * 成績(jī) */public boolean insert(String name, int score, int score1, int score2,int score3) try /* * 寫入文件 */Writer out = new FileWriter(fileName, true);out.write(name + : + score + : + score1 + : + score2 + :+ score3 + rn);out.close();return true; catch (IOException e) e.printStackTrace();return false;/* * 入口方法 * * param argspublic static void main(String args) new Create();3,修改類public class Modify extends JFrame /* * 當(dāng)前容器 */Container currentContainer = this;/* * 存儲(chǔ)的文件名 */String fileName = new String(data.txt);/* * 顯示標(biāo)題文本 */JLabel titleLabel = new JLabel(修改成績(jī)界面);/* * 標(biāo)題面板 */JPanel titlePanel = new JPanel();/* * 顯示姓名文本 */JLabel nameLabel = new JLabel(學(xué)生姓名);/* * 顯示成績(jī)文本 */JLabel scoreLabel = new JLabel(學(xué)生學(xué)號(hào));JLabel score1Label = new JLabel(英語成績(jī));JLabel score2Label = new JLabel(數(shù)學(xué)成績(jī));JLabel score3Label = new JLabel(專業(yè)成績(jī));/* * 姓名文本框 */JTextField nameTextField = new JTextField(15);/* * 成績(jī)文本框 */JTextField scoreTextField = new JTextField(15);JTextField score1TextField = new JTextField(15);JTextField score2TextField = new JTextField(15);JTextField score3TextField = new JTextField(15);/* * 輸入面板 */JPanel inputPanel = new JPanel();/* * 修改按鈕 */JButton modifyBtn = new JButton(修改);/* * 管理面板 */JPanel managePanel = new JPanel();/* * 按鈕監(jiān)聽器 */ButtonActionListener btnAction = new ButtonActionListener();/* * 構(gòu)造器:初始化窗體 */public Modify() this.setSize(280, 300);this.setLocation(300, 300);this.setResizable(false);this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);this.setTitle(java學(xué)生成績(jī)管理系統(tǒng));/* * 將窗體劃分為上中下三個(gè)塊 */this.setLayout(new BorderLayout();this.add(titlePanel, North);this.add(inputPanel, Center);this.add(managePanel, South);/* * 第一塊用來放標(biāo)題面板 = = */titlePanel.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 10);titlePanel.add(titleLabel);titleLabel.setFont(new Font(黑體, Font.PLAIN, 16);/* * 第二塊放輸入面板 */inputPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 10);inputPanel.add(nameLabel);/ 姓名inputPanel.add(nameTextField);inputPanel.add(scoreLabel);/ 成績(jī)inputPanel.add(scoreTextField);/ inputPanel.add(score1Label);/ 成績(jī)1inputPanel.add(score1TextField);/ inputPanel.add(score2Label);/ 成績(jī)2inputPanel.add(score2TextField);/ inputPanel.add(score3Label);/ 成績(jī)3inputPanel.add(score3TextField);/* 第三塊是管理面板 */managePanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 10);managePanel.add(modifyBtn);/* * 為按鈕注冊(cè)按鈕監(jiān)聽器 */modifyBtn.addActionListener(btnAction);/* * 顯示窗體 */this.setVisible(true);/* * 按鈕監(jiān)聽類 */class ButtonActionListener implements ActionListener public void actionPerformed(ActionEvent e) /* * 檢查是否輸入了姓名 */String name = nameTextField.getText().trim();if (name.length() = 0) JOptionPane.showMessageDialog(currentContainer, 輸入的姓名為空!,操作失敗, JOptionPane.ERROR_MESSAGE);return;/* * 是否要求查詢 */int score = 0;int score1 = 0;int score2 = 0;int score3 = 0;/* * 檢查是否輸入了成績(jī),輸入不同的成績(jī) */try score = Integer.parseInt(scoreTextField.getText().trim(); catch (Exception e1) JOptionPane.showMessageDialog(currentContainer, 輸入的成績(jī)不是數(shù)字!,操作失敗, JOptionPane.ERROR_MESSAGE);return;try score1 = Integer.parseInt(score1TextField.getText().trim(); catch (Exception e1) JOptionPane.showMessageDialog(currentContainer, 輸入的成績(jī)不是數(shù)字!,操作失敗, JOptionPane.ERROR_MESSAGE);return;try score2 = Integer.parseInt(score2TextField.getText().trim(); catch (Exception e1) JOptionPane.showMessageDialog(currentContainer, 輸入的成績(jī)不是數(shù)字!,操作失敗, JOptionPane.ERROR_MESSAGE);return;try score3 = Integer.parseInt(score3TextField.getText().trim(); catch (Exception e1) JOptionPane.showMessageDialog(currentContainer, 輸入的成績(jī)不是數(shù)字!,操作失敗, JOptionPane.ERROR_MESSAGE);return;/* * 是否要求錄入 */* * 是否要求修改 */if (e.getSource() = modifyBtn) int choose = JOptionPane.showConfirmDialog(currentContainer,確定要修改該學(xué)生的成績(jī)嗎?, 確認(rèn)修改,JOptionPane.YES_NO_CANCEL_OPTION);if (choose = JOptionPane.YES_OPTION) boolean flag = modify(name, score, score1, score2, score3); / 當(dāng)確定時(shí)修改所有名字為name的同學(xué)的成績(jī)?yōu)閟coreif (flag) JOptionPane.showMessageDialog(currentContainer, 已將修改,修改成功!, JOptionPane.PLAIN_MESSAGE); else JOptionPane.showMessageDialog(currentContainer,沒有該姓名的同學(xué)的成績(jī)記錄!, 修改失??!,JOptionPane.ERROR_MESSAGE);return;public boolean modify(String name, int score, int score1, int score2,int score3) try /* * 先讀入所有學(xué)生成績(jī)信息, 把滿足條件的記錄更新為新成績(jī)后,暫存到內(nèi)存中 其他記錄直接存儲(chǔ) */BufferedReader in = new BufferedReader(new FileReader(fileName);String line = null, data = ;boolean flag = false;while (line = in.readLine() != null) String info = line.split(:);if (info0.equals(name) line = info0 + : + score + : + score1 + : + score2+ : + score3;flag = true;data += line + rn;in.close();/* * 重新寫文件 */Writer out = new FileWriter(fileName);out.write(data);out.close();return flag; catch (IOException e) e.printStackTrace();return false;入口方法public static void main(String args) new Modify();4,刪除類public class Delete extends JFrame Container currentContainer = this;String fileName = new String(data.txt);JLabel titleLabel = new JLabel(刪除成績(jī)界面);JPanel titlePanel = new JPanel();JLabel nameLabel = new JLabel(學(xué)生姓名);JLabel scoreLabel = new JLabel(學(xué)生學(xué)號(hào));JLabel score1Label = new JLabel(英語成績(jī));JLabel score2Label = new JLabel(數(shù)學(xué)成績(jī));JLabel score3Label = new JLabel(專業(yè)成績(jī));JTextField nameTextField = new JTextField(15);JTextField scoreTextField = new JTextField(15);JTextField score1TextField = new JTextField(15);JTextField score2TextField = new JTextField(15);JTextField score3TextField = new JTextField(15);JPanel inputPanel = new JPanel();JButton deleteBtn = new JButton(刪除);JPanel managePanel = new JPanel();ButtonActionListener btnAction = new ButtonActionListener();public Delete() this.setSize(280, 300);this.setLocation(300, 300);this.setResizable(false);this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);this.setTitle(java學(xué)生成績(jī)管理系統(tǒng));this.setLayout(new BorderLayout();this.add(titlePanel, North);this.add(inputPanel, Center);this.add(managePanel, South);titlePanel.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 10);titlePanel.add(titleLabel);titleLabel.setFont(new Font(黑體, Font.PLAIN, 16);inputPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 10);inputPanel.add(nameLabel);/ 姓名inputPanel.add(nameTextField);inputPanel.add(scoreLabel);/ 成績(jī)inputPanel.add(scoreTextField);/ ?inputPanel.add(score1Label);/ 成績(jī)1inputPanel.add(score1TextField);/ ?inputPanel.add(score2Label);/ 成績(jī)2inputPanel.add(score2TextField);/ ?inputPanel.add(score3Label);/ 成績(jī)3inputPanel.add(score3TextField);/ ?managePanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 10);managePanel.add(deleteBtn);deleteBtn.addActionListener(btnAction);this.setVisible(true);class ButtonActionListener implements ActionListener public void actionPerformed(ActionEvent e) String name = nameTextField.getText().trim();if (name.length() = 0) JOptionPane.showMessageDialog(currentContainer, 輸入的姓名為空!,操作失敗, JOptionPane.ERROR_MESSAGE);return;int score = 0;int score1 = 0;int score2 = 0;int score3 = 0;if (e.getSource() = deleteBtn) try score = Integer.parseInt(scoreTextField.getText().trim();int choose = JOptionPane.showConfirmDialog(currentContainer, 確定要?jiǎng)h除該學(xué)號(hào)的同學(xué)嗎?, 確認(rèn)刪除,JOptionPane.YES_NO_CANCEL_OPTION);if (choose = JOptionPane.YES_OPTION) boolean flag = delete(name, score); / 當(dāng)確定時(shí)刪除名字為name的同學(xué)成績(jī)?yōu)閟core的成績(jī)一次if (flag) nameTextField.setText(); / 清空姓名框scoreTextField.setText();score1TextField.setText();score2TextField.setText();score3TextField.setText();/ 清空成績(jī)框JOptionPane.showMessageDialog(currentContainer,已刪除該同學(xué)的成績(jī)!, 刪除成功!,JOptionPane.PLAIN_MESSAGE); else JOptionPane.showMessageDialog(currentContainer,沒有找到改學(xué)號(hào)的同學(xué)!, 刪除失??!,JOptionPane.PLAIN_MESSAGE); catch (NumberFormatException e1) / 當(dāng)catch到NumberFormatException時(shí)說明parseInt失?。簺]有輸入成績(jī),此時(shí)應(yīng)刪除所有成績(jī)int choose = JOptionPane.showConfirmDialog(currentContainer, 確定要?jiǎng)h除所有重名的同學(xué)嗎?, 確認(rèn)刪除,JOptionPane.YES_NO_CANCEL_OPTION);if (choose = JOptionPane.YES_OPTION) boolean flag = delete(name); / 當(dāng)確定時(shí)刪除名字為name的同學(xué)的所有成績(jī)if (flag) nameTextField.setText(); / 清空姓名框scoreTextField.setText(); / 清空成績(jī)框JOptionPane.showMessageDialog(currentContainer,已刪除該同學(xué)的所有成績(jī)!, 刪除成功!,JOptionPane.PLAIN_MESSAGE); else JOptionPane.showMessageDialog(currentContainer,該同學(xué)沒有成績(jī)!, 刪除失??!,JOptionPane.PLAIN_MESSAGE);return;try score = Integer.parseInt(scoreTextField.getText().trim(); catch (Exception e1) JOptionPane.showMessageDialog(currentContainer, 輸入的成績(jī)不是數(shù)字!,操作失敗, JOptionPane.ERROR_MESSAGE);return;try score1 = Integer.parseInt(score1TextField.getText().trim(); catch (Exception e1) JOptionPane.showMessageDialog(currentContainer, 輸入的成績(jī)不是數(shù)字!,操作失敗, JOptionPane.ERROR_MESSAGE);return;try score2 = Integer.parseInt(score2TextField.getText().trim(); catch (Exception e1) JOptionPane.showMessageDialog(currentContainer, 輸入的成績(jī)不是數(shù)字!,操作失敗, JOptionPane.ERROR_MESSAGE);return;try score3 = Integer.parseInt(score3TextField.getText().tri

注意事項(xiàng)

本文(學(xué)生管理系統(tǒng)-java課程設(shè)計(jì).doc)為本站會(huì)員(good****022)主動(dòng)上傳,裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)上載內(nèi)容本身不做任何修改或編輯。 若此文所含內(nèi)容侵犯了您的版權(quán)或隱私,請(qǐng)立即通知裝配圖網(wǎng)(點(diǎn)擊聯(lián)系客服),我們立即給予刪除!

溫馨提示:如果因?yàn)榫W(wǎng)速或其他原因下載失敗請(qǐng)重新下載,重復(fù)下載不扣分。




關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號(hào):ICP2024067431號(hào)-1 川公網(wǎng)安備51140202000466號(hào)


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺(tái),本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請(qǐng)立即通知裝配圖網(wǎng),我們立即給予刪除!