【正文】
securityI. I NTRODUCTIONThe rapid developments in information technology, particularly in wireless munication and web services technologies, are greatly changing the way people access and work with information. The convenience and powerful functionality offered by mobile devices such as PDAs, has encouraged many people to investigate the benefits of using them. Wireless and handheld devices abound as vendors pitch the mon themes of onetoone puting, instant munication and anytime, anywhere information access. While web services provide a technology for serviceoriented puting. Web services allow programs written in different languages on different platforms to municate with each other in a standard way . By integrating these technologies, consistent business models can be implemented on a broad array of devices: not just on mobile devices operating over mobile networks, but also on servers and PCs connected to the Internet. The food ordering process in restaurants requires the coordination of simple tasks. Instruction flows mainly from customers to waiters then to kitchen and/or the bar staff, finally to the cashier . In a medium to large and busy restaurant this coordination is a challenge and requires an efficient ordering system. Errors in ordering processes lead to incorrect or out of sequence meal preparation or nonconsumable and results in added cost to the business.This paper presents an integration of wireless munication technologies and web services technologies to realize a wireless food ordering system. In this system, it implements wired and wireless data access to the servers and food ordering functions through both desktop PCs and mobile devices such as PDAs over a wired/wireless integrated local area network. The system is based on secure web service architecture and some security strategies to ensure mobile munication security are adopted. Web servicesbased wireless applications on mobile devices provide a means of convenience, improving efficiency and accuracy. II. W IRELESS LAN AND W EB SERVICESA. Wireless LAN A wireless LAN (WLAN, Wireless Local Area Network) is a flexible data munication system implemented as an extension to or as an alternative for, a wired LAN within a building or campus . Using electromagnetic waves, WLANs transmit and receive data over the air, minimizing the need for wired connections. Thus, WLANs bine data connectivity with user mobility, and, through simplified configuration, enable movable LANs. The IEEE group of standards specifies the technologies for wireless LANs. standards use the Ethernet protocol and CSMA/CA (carrier sense multiple access with collision avoidance) for path sharing and include an encryption method, the Wired Equivalent Privacy algorithm. The , b, and g standards are the most mon for home wireless access points and large business wireless systems.A remote user can use WLAN to access the Internet th。 Wireless。感謝父母及家人在我求學(xué)路上的無微關(guān)懷和物質(zhì)上的支持,使我能夠安心的完成學(xué)業(yè)。同時,我要感謝學(xué)校為我們提供了這么好的學(xué)習(xí)環(huán)境,提供實(shí)驗室和機(jī)器,搭建了一個完美的實(shí)驗平臺,為我們安排指導(dǎo)老師,使我們能夠在老師的指導(dǎo)幫助下完成設(shè)計。通過我的努力及老師同學(xué)的幫助終于完成了,作為我大學(xué)四年的一個總結(jié)。老師淵博的知識、嚴(yán)謹(jǐn)?shù)淖黠L(fēng)、誨人不倦的態(tài)度和學(xué)術(shù)上精益求精的精神讓我受益終生。綜上所述,本文只局限于軟件層的設(shè)計與開發(fā),沒有移植到ARM版上測試,該系統(tǒng)還局限于網(wǎng)線連接通信,所以今后的工作應(yīng)該在嵌入式系統(tǒng)開發(fā)方面和在無線方面的繼續(xù)研究。,實(shí)現(xiàn)了系統(tǒng)的圖形界面的開發(fā),和數(shù)據(jù)庫的基本操作。結(jié) 論本文較完整地分析了點(diǎn)菜系統(tǒng)的需求分析、功能需求分析、系統(tǒng)的詳細(xì)設(shè)計和軟件設(shè)計,完成了一個小型簡易的點(diǎn)菜系統(tǒng)。圖55 數(shù)據(jù)庫管理界面圖 測試小結(jié)通過以上測試可以得知,該系統(tǒng)實(shí)現(xiàn)了點(diǎn)菜的基本功能,顧客可以實(shí)現(xiàn)點(diǎn)菜、加菜、刪菜、后廚可以接收到菜單、數(shù)據(jù)庫可以管理菜單列表。圖54 賬單界面圖6. 數(shù)據(jù)庫管理模塊:數(shù)據(jù)庫管理模塊主要是管理數(shù)據(jù)庫菜單列表,可以添加菜肴信息,刪除菜肴信息,并且可以查找是不是有那道菜肴等幾個功能,在這我只對添加菜肴信息測試。圖 52 顧客點(diǎn)菜界面圖:當(dāng)后廚點(diǎn)擊接收按鈕時,就可以接收到剛剛顧客點(diǎn)的菜單,后廚廚師就可以按照菜單做菜,當(dāng)做完一個菜時就點(diǎn)擊做完,則該菜到做完列表中,當(dāng)菜做完時,廚師可以點(diǎn)擊清空,清空菜單列表,點(diǎn)擊接受可以接受下個顧客的菜單或者這個顧客添加的菜。在這里可以進(jìn)行刪菜和加菜,在這里就不測試了。開臺的界面功能如圖52所示。前臺的圖形界面和功能主要如圖51所示。:啟動服務(wù)器模塊,等待客戶端連接。 系統(tǒng)測試本系統(tǒng)分為五個模塊,服務(wù)器模塊、前臺模塊、顧客點(diǎn)菜模塊、后廚模塊、數(shù)據(jù)庫管理模塊。因此,在測試中不可能運(yùn)行路徑的每一種組合。,逐步轉(zhuǎn)向大規(guī)模。、有效的輸入數(shù)據(jù),還要包括無效的不合理的輸入數(shù)據(jù)。,從而避免軟件開發(fā)人員因心理上的原因,不愿否定自己成果而總認(rèn)為自己開發(fā)軟件沒有錯誤或錯誤不大。 。 ,能很容易的知道用戶會用到哪些功能,會遇到哪些問題。 ,不需要了解程序內(nèi)部的代碼及實(shí)現(xiàn)。 黑盒測試 測試方法以黑盒測試為主。第5章 系統(tǒng)測試系統(tǒng)測試是基于系統(tǒng)整體需求說明書的黑盒類測試,應(yīng)覆蓋系統(tǒng)所有聯(lián)合的部件。//回滾QMessageBox::warning(this,tr(tableModel),tr(數(shù)據(jù)庫錯誤:%1).arg(modellastError().text()))。//開始事務(wù)操作if(modelsubmitAll()) //提交所有更改modeldatabase().mit()。//加入數(shù)據(jù)}當(dāng)刪除、修改數(shù)據(jù)庫內(nèi)容完后,需要點(diǎn)擊提交修改Button,才難保存到數(shù)據(jù)中,主要用到QSqlTableModel類中的database().mit()成員函數(shù)。modelinsertRow(rowNum)。主要實(shí)現(xiàn)代碼如下:void Widget::on_addButton_clicked(){ int rowNum =modelrowCount()。 else modelsubmitAll()。//獲取當(dāng)前行 //刪除當(dāng)前行 int ok= QMessageBox::warning(this,tr(刪除當(dāng)前行內(nèi)容!),tr(確定刪除?), QMessageBox::Yes,QMessageBox::No)。主要實(shí)現(xiàn)代碼如下: void Widget::on_deleteButton_clicked(){ int curRow = viewcurrentIndex().row()。viewsetModel(model)。modelsetEditStrategy(QSqlTableModel::OnManualSubmit)。主要實(shí)現(xiàn)代碼如下:model =new QSqlTableModel(view)。} 數(shù)據(jù)庫管理模塊數(shù)據(jù)庫管理模塊主要是管理菜單信息的,可以添加菜品信息有添加Button、刪除菜品信息有刪除Button、并能夠查詢菜品有查詢Button。connect(recDel,SIGNAL(clicked()),this,SLOT(on_recDelButton_clicked()))。connect(finishButton,SIGNAL(clicked()),this,SLOT(on_finishButton_clicked()))。connect(rec,SIGNAL(clicked()),this,SLOT(slotrec()))。layoutaddLayout(listLayout)。listLayoutaddWidget(finishList)。QHBoxLayout *listLayout = new QHBoxLayout。btnLayout addWidget(clearButton)。btnLayout addWidget(recDel)。主要實(shí)現(xiàn)如下:hhDialog::hhDialog(QWidget *parent,Qt::WindowFlags f):QDialog(parent,f){QHBoxLayout *btnLayout = new QHBoxLayout。send(sockfd,SeleteList,sizeof(SeleteList),0)。SeleteList[0].buffer[1]=tableNumber。quitButtonshow()。connect(btn,SIGNAL(clicked()),dlg,SLOT(close()))。layoutaddWidget(label)。QPushButton *btn =new QPushButton(tr(確定))。QLabel *label= new QLabel。(QString(%1).arg(ipric))。dlgsetWindowTitle(tr(消費(fèi)金額))。結(jié)賬功能代碼實(shí)現(xiàn)如下:void diancaiDialog::on_listPayButton_clicked() //結(jié)帳{if(pro==true){。 pro=false。m++) ipric+=SeleteList[m].pric*SeleteList[m].num。 for(m=0。 } //計算消費(fèi)金額 int m。ii++) printf(%s%d\n,additem[ii].addnam,additem[ii].addnum)。 for(ii=0。 send(sockfd,