軟件工程個(gè)人電子相冊(cè)詳細(xì)設(shè)計(jì).doc
《軟件工程個(gè)人電子相冊(cè)詳細(xì)設(shè)計(jì).doc》由會(huì)員分享,可在線(xiàn)閱讀,更多相關(guān)《軟件工程個(gè)人電子相冊(cè)詳細(xì)設(shè)計(jì).doc(16頁(yè)珍藏版)》請(qǐng)?jiān)谘b配圖網(wǎng)上搜索。
一、實(shí)驗(yàn)?zāi)康?通過(guò)對(duì)所選題目進(jìn)行詳細(xì)設(shè)計(jì),掌握算法的設(shè)計(jì)方法與算法的描述;2掌握常用算法描述工具的使用;3. 完成一個(gè)小型軟件系統(tǒng)的算法設(shè)計(jì)。二、實(shí)驗(yàn)準(zhǔn)備1. 熟悉算法描述工具的使用三、實(shí)驗(yàn)要求完成所選題目的詳細(xì)設(shè)計(jì),提交實(shí)驗(yàn)報(bào)告四、實(shí)驗(yàn)內(nèi)容:1. 背景在完成了針對(duì)電子相冊(cè)管理軟件市場(chǎng)的前期調(diào)查,同時(shí)與多位軟件使用者進(jìn)行了全面深入地探討和分析的基礎(chǔ)上,提出了這份軟件需求規(guī)格說(shuō)明書(shū)。此需求規(guī)格說(shuō)明書(shū)對(duì)電子相冊(cè)管理系統(tǒng)軟件做了全面細(xì)致的用戶(hù)需求分析,明確所要開(kāi)發(fā)的軟件應(yīng)具有的功能、性能與界面,使系統(tǒng)分析人員及軟件開(kāi)發(fā)人員能清楚地了解用戶(hù)的需求,并在此基礎(chǔ)上進(jìn)一步提出概要設(shè)計(jì)說(shuō)明書(shū)和完成后續(xù)設(shè)計(jì)與開(kāi)發(fā)工作。本說(shuō)明書(shū)的預(yù)期讀者為用戶(hù)、業(yè)務(wù)或需求分析人員、測(cè)試人員、項(xiàng)目管理人員。2. 程序(模塊)系統(tǒng)的組織結(jié)構(gòu)(1) 用戶(hù)注冊(cè)進(jìn)入注冊(cè)界面錄入基本及必填信息提交數(shù)據(jù)是否注冊(cè)取消服務(wù),等待用戶(hù)下步操作YesNo進(jìn)入登錄首界面(2) 用戶(hù)登入是否登錄取消服務(wù),退出界面YesNo管理員進(jìn)入登錄首界面輸入用戶(hù)名及密碼進(jìn)入管理員界面系統(tǒng)查詢(xún)匹配YesNo(3) 用戶(hù)管理功能進(jìn)入個(gè)人檔案用戶(hù)界面選擇相應(yīng)操作進(jìn)入個(gè)人相冊(cè)查看、修改相應(yīng)數(shù)據(jù)選擇相應(yīng)操作打開(kāi)相冊(cè)上傳相片刪除相冊(cè)瀏覽相片3. 界面設(shè)計(jì)要求(1)用戶(hù)注冊(cè)(2)用戶(hù)登錄(3) 用戶(hù)個(gè)人相冊(cè)管理4 本軟件系統(tǒng)中各程序(模塊)的設(shè)計(jì)說(shuō)明(1) 用戶(hù)注冊(cè)的代碼import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.ButtonGroup;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JRadioButton;import javax.swing.JScrollPane;import javax.swing.JTextArea;import javax.swing.JTextField;public class qwe extends JFrame implements ActionListenerprivate static final String ADD = ADD;private static final String CANCEL = CANCEL;private static final long serialVersionUID = -196950585230726337L;private JLabel name_lab;private JLabel age_lab;private JLabel sex_lab;private JRadioButton man;private JRadioButton woman;private JLabel jLabel0;private JTextArea info_ta;private JScrollPane jScrollPane0;private JTextField name_jf;private JTextField age_jf;private JButton add;private JButton cancel;private ButtonGroup bg=new ButtonGroup();public static void main(String args)new qwe();private void initComponents() setTitle(注冊(cè));setLayout(null);add(getName_lab();add(getAge_lab();add(getSex_lab();add(getMan();add(getWoman();add(getJLabel0();add(getJScrollPane0();add(getName_jf();add(getAge_jf();add(getAdd();add(getCancel();setSize(316, 320);setVisible(true);setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);this.setResizable(false);private JButton getCancel()if (cancel = null)cancel = new JButton();cancel.setText(取消);cancel.setActionCommand(CANCEL);cancel.setBounds(177, 203, 81, 28);cancel.addActionListener(this);return cancel;private JButton getAdd()if (add = null)add = new JButton();add.setText(注冊(cè));add.setActionCommand(ADD);add.setBounds(69, 203, 81, 28);add.addActionListener(this);return add;private JTextField getAge_jf()if (age_jf = null)age_jf = new JTextField();age_jf.setText();age_jf.setBounds(61, 41, 138, 22);age_jf.setHorizontalAlignment(JTextField.RIGHT);return age_jf;private JTextField getName_jf()if (name_jf = null)name_jf = new JTextField();name_jf.setText();name_jf.setBounds(62, 10, 178, 22);return name_jf;private JScrollPane getJScrollPane0()if (jScrollPane0 = null)jScrollPane0 = new JScrollPane();jScrollPane0.setBounds(63, 103, 210, 80);jScrollPane0.setViewportView(getInfo_ta();return jScrollPane0;private JTextArea getInfo_ta()if (info_ta = null)info_ta = new JTextArea();info_ta.setText();return info_ta;private JLabel getJLabel0()if (jLabel0 = null)jLabel0 = new JLabel();jLabel0.setText(簡(jiǎn)歷);jLabel0.setBounds(17, 99, 41, 18);return jLabel0;private JRadioButton getWoman() if (woman = null) woman = new JRadioButton();bg.add(woman);woman.setSelected(true);woman.setText(女);woman.setBounds(105, 65, 45, 26);return woman;private JRadioButton getMan()if (man = null)man = new JRadioButton();bg.add(man);man.setText(男);man.setBounds(58, 66, 47, 26);return man;private JLabel getSex_lab()if (sex_lab = null)sex_lab = new JLabel();sex_lab.setText(性別);sex_lab.setBounds(16, 70, 41, 18);return sex_lab;private JLabel getAge_lab()if (age_lab = null)age_lab = new JLabel();age_lab.setText(年齡);age_lab.setBounds(14, 42, 41, 18);return age_lab;private JLabel getName_lab()if (name_lab = null)name_lab = new JLabel();name_lab.setText(姓名);name_lab.setBounds(15, 11, 41, 20);return name_lab;public qwe()initComponents();public void actionPerformed(ActionEvent e)String action = e.getActionCommand();System.out.println(action);if (action != null & ADD.equals(action)StringBuffer sb=new StringBuffer();sb.append(姓名: ).append(name_jf.getText().append(n).append(年齡: ).append(age_jf.getText().append(n).append(性別: );if(woman.isSelected()sb.append(女n);elsesb.append(男n);sb.append(簡(jiǎn)歷: ).append(info_ta.getText();JOptionPane.showMessageDialog(this, sb.toString();else if (action != null & action.equals(CANCEL)name_jf.setText();age_jf.setText();woman.setSelected(true);man.setSelected(false);info_ta.setText();(2) 用戶(hù)登錄的代碼import javax.swing.*;import java.awt.*;import java.awt.event.*;class MyJPanel extends JPanel implements ActionListenerprivate int count=0;private JLabel label1,label2;private JTextField text;private JPasswordField pass;private JButton button1,button2;MyJPanel()label1=new JLabel(用戶(hù)名);label2=new JLabel(密碼);button1=new JButton(確定);button2=new JButton(取消);text=new JTextField(20);pass=new JPasswordField(20);button1.setMnemonic(KeyEvent.VK_O);/設(shè)置按鈕快捷鍵button2.setMnemonic(KeyEvent.VK_C);button1.setActionCommand(entry);button2.setActionCommand(cancel);button1.addActionListener(this);/注冊(cè)按鈕事件button2.addActionListener(this);/注冊(cè)按鈕事件setBackground(Color.cyan);/設(shè)定面板背景色add(label1);add(text);add(label2);add(pass);add(button1);add(button2);public void actionPerformed(ActionEvent e)if (e.getActionCommand().equals(entry)count+; /計(jì)數(shù)String username,password;if (count3) username=text.getText();password=pass.getText();if (username.equals(abcd)&password.equals(123456)text.setText(用戶(hù)名及密碼正確!);pass.setText();elsetext.setText();pass.setText();elseSystem.exit(0);/退出程序else System.exit(0);/退出程序public class dengru extends JFrame public static void main(String args) MyJPanel jp=new MyJPanel();/定義面板jp.setBorder(BorderFactory.createTitledBorder(輸入用戶(hù)名和密碼);/設(shè)定邊界JFrame frame=new JFrame(用戶(hù)登錄);frame.setSize(300,150);frame.setContentPane(jp);/在框架中加載面板frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);/設(shè)置框架關(guān)閉按鈕事件frame.setVisible(true);(3) 用戶(hù)個(gè)人電子相冊(cè)管理的代碼import java.awt.BorderLayout;import java.awt.Color;import java.awt.Image;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.io.File;import java.sql.Time;import javax.swing.ImageIcon;import javax.swing.JButton;import javax.swing.JFileChooser;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JPanel;import javax.swing.Timer;public class task extends JFrame implements ActionListenerJPanel p_photo=new JPanel();JLabel l_photo=new JLabel();JPanel p_button=new JPanel();JButton jb_open=new JButton(打開(kāi));JButton jb_prev=new JButton(上一個(gè));JButton jb_next=new JButton(下一個(gè));JButton jb_auto=new JButton(自動(dòng));JButton jb_fangda=new JButton(放大);JButton jb_suoxiao=new JButton(縮小);JButton jb_close=new JButton(關(guān)閉);int c=500,d=380;JFileChooser fc=new JFileChooser();File files;ImageIcon ii;Timer t;public task() super(電子相冊(cè)); l_photo.setOpaque(true); BorderLayout bb=new BorderLayout(); p_photo.setLayout(bb); p_photo.add(l_photo,BorderLayout.CENTER); this.add(p_photo,BorderLayout.CENTER); p_button.add(jb_open); jb_open.addActionListener(this); p_button.add(jb_prev); jb_prev.addActionListener(this); p_button.add(jb_next); jb_next.addActionListener(this); p_button.add(jb_auto); jb_close.addActionListener(this); p_button.add(jb_fangda); jb_fangda.addActionListener(this); p_button.add(jb_suoxiao); jb_suoxiao.addActionListener(this); jb_auto.addActionListener(this); p_button.add(jb_close); this.add(p_button,BorderLayout.SOUTH); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setSize(500,420); this.setLocationRelativeTo(null); this.setVisible(true);public static void main(String args) new task();int index;int flag;public void actionPerformed(ActionEvent e) String str=e.getActionCommand(); System.out.println(str); if(str.equals(打開(kāi)) open(); if(str.equals(上一個(gè)) c=500;d=380; prev(); if(str.equals(下一個(gè)) c=500;d=380; next(); if(str.equals(自動(dòng)) auto(); if(str.equals(放大) c+=10; d+=10; cd(); if(str.equals(縮小) c-=10; d-=10; cd(); if(str.equals(關(guān)閉) System.exit(0); public boolean open() fc.setMultiSelectionEnabled(true); fc.showOpenDialog(null); files=fc.getSelectedFiles(); index=files.length; flag=files.length; if(index=0) JOptionPane.showMessageDialog(null,你未添加任何圖片n請(qǐng)重新添加); return false; else setimage(0); return true; public void prev() if(index=0) JOptionPane.showMessageDialog(null,你還未添加任何圖片); else if(indexflag) index=0; setimage(index+); else setimage(index+); public void next() if(index=0) JOptionPane.showMessageDialog(null,你還未添加任何圖片); else if(indexflag) index=0; setimage(index+); else setimage(index+); public void auto() ActionListener taskPerformer = new ActionListener() public void actionPerformed(ActionEvent evt) jb_next.doClick(); ; t= new Timer(2000,taskPerformer); t.start();public void setimage(int a) ii = new ImageIcon(filesa.toString(); ii.setImage(ii.getImage().getScaledInstance(c,d,Image.SCALE_FAST); l_photo.setIcon(ii);5、 模塊相互關(guān)系表系統(tǒng)功能總結(jié)構(gòu)圖 電子相冊(cè)管理系統(tǒng)用戶(hù)注冊(cè)子系統(tǒng)登錄子系統(tǒng)管理員信息管理子系統(tǒng)用戶(hù)信息管理子系統(tǒng)系統(tǒng)設(shè)置管理子系統(tǒng)注 冊(cè)信息完善個(gè)人電子相冊(cè)的管理5、 試驗(yàn)總結(jié)- 1.請(qǐng)仔細(xì)閱讀文檔,確保文檔完整性,對(duì)于不預(yù)覽、不比對(duì)內(nèi)容而直接下載帶來(lái)的問(wèn)題本站不予受理。
- 2.下載的文檔,不會(huì)出現(xiàn)我們的網(wǎng)址水印。
- 3、該文檔所得收入(下載+內(nèi)容+預(yù)覽)歸上傳者、原創(chuàng)作者;如果您是本文檔原作者,請(qǐng)點(diǎn)此認(rèn)領(lǐng)!既往收益都?xì)w您。
下載文檔到電腦,查找使用更方便
9.9 積分
下載 |
- 配套講稿:
如PPT文件的首頁(yè)顯示word圖標(biāo),表示該P(yáng)PT已包含配套word講稿。雙擊word圖標(biāo)可打開(kāi)word文檔。
- 特殊限制:
部分文檔作品中含有的國(guó)旗、國(guó)徽等圖片,僅作為作品整體效果示例展示,禁止商用。設(shè)計(jì)者僅對(duì)作品中獨(dú)創(chuàng)性部分享有著作權(quán)。
- 關(guān) 鍵 詞:
- 軟件工程 個(gè)人 電子相冊(cè) 詳細(xì) 設(shè)計(jì)
鏈接地址:http://m.appdesigncorp.com/p-9163605.html