【正文】
功能。 SendToWarehouse() 銷售人員點擊通知倉庫 按 鈕 時 觸 發(fā) , 它 調(diào) 用 DateBase 中的GetPaidOrderList( )方法,取得以付款的定單列表。它調(diào)用 Invoice 類的 Print 的方法,并調(diào)用 Customer 類中的 SendInvoice 方法。 GetPaymentStatus()取得付款狀態(tài), 從 Order 類的 OrderPayment 屬性取值 VerifyCustomerID()驗證客戶帳號, 被 Customer 類的 Paymoney 方法使用 AcceptPayment()接受客戶付款,方 法將修改 Order 類的 OrderPayment 對象 網(wǎng)上購物系統(tǒng) —— 福建農(nóng)林大學計算機科學與技術 15 三 用 UML 對系統(tǒng)建模 1.用例包圖及用例圖(用例建模) 網(wǎng)上購物系統(tǒng) —— 福建農(nóng)林大學計算機科學與技術 16 標準產(chǎn)品 自選部件付款購買送貨S t a n d a r d C o n f i g u r a t i o n( f r o m 標準產(chǎn)品 )S e l f C o n f i g u r a t i o n( f r o m 自選部件 )O r d e r ( f r o m 購買 )I n f o r m W a r e H o u s e a b o u t O r d e r( f r o m 送貨 )R e q u e s t S a l e s p e r s o n C o n t a c t( f r o m 購買 )U p d a t e O r d e r S t a t u s( f r o m 送貨 )P r i n t I n v o i c e( f r o m 付款 )V e r i f y a n d A c c e p t P a y m e n t( f r o m 付款 ) 圖 2 網(wǎng)上購物系統(tǒng)用例包圖 V e r i f y a n d A c c e p t P a y m e n t( f r o m 付款 )S e l f C o n f i g u r a t i o n( f r o m 自選部件 )S t a n d a r d C o n f i g u r a t i o n( f r o m 標準產(chǎn)品 )O r d e r ( f r o m 購買 )W a r e h o u s eC u s t o m e rR e q u e s t S a l e s p e rs o n C o n t a c t( f r o m 購買 ) e x t e n d P r i n t I n v o i c e( f r o m 付款 )I n f o r m W a r e H o u s e a b o u t O r d e r( f r o m 送貨 )U p d a t e O r d e r S t a t u s( f r o m 送貨 )S a l e s p e r s o n 圖 3 網(wǎng)上購物系統(tǒng)用例圖 2.系統(tǒng)用例的活動圖及活動文檔(活動建模) 網(wǎng)上購物系統(tǒng) —— 福建農(nóng)林大學計算機科學與技術 17 M odi f i y S h op i ng C a rD i s p l a y C o m p ut e r 39。該頁面顯示標準配置的計算機供 Customer 選購。 3. Modify Shopping Car Customer 對購物車內(nèi)商品隨時進行增減刪改。 5. Order 如果 Customer 決定定購購物車內(nèi)商品,點擊頁面上“下一步”按鈕進入定購場景。s c o m p o n e n tM o d i f y S h o p p i n g C a rA d d t o S h o p p i n g C a rC o m p u t e r a n d S h o w To a l C o s tO r d e r[ To t a l C o s t 0 ] 圖 5 SelfConfiguration 的活動圖 ? SelfConfiguration 的文檔 1. Display Computer39。 2. Add to Shopping Car Customer 查詢選擇計算機部件,將選中的計算機部件加入購物車。 4. Compute and Show Total Costing web 頁面動態(tài)顯示并計算出 Customer 加入購物車內(nèi)商品的總價。 網(wǎng)上購物系統(tǒng) —— 福建農(nóng)林大學計算機科學與技術 19 C o n t a c t i n g w i t h c u s t o m e rG e t t in g n e e d C o n t a c t C u s t o m e rG e n e r a t i n g f i n a l o r d e r S a v e t o D a t a b a s eM o d i f i e d o r ig i n a l o r d e r 圖 6 Request Salesperson Contact 的活動圖 ? Request Salesperson Contact 的文檔 1. Getting need Contact Customer Customer 在填寫完定單后選擇 Contact(或相似命名的)功能來發(fā)送消息給 Salesman 要求咨詢。 3. Modified original order Salesman 把與 Customer 的咨詢并協(xié)商價格后的結果在 Server 頁面上對原定單進行修改。 網(wǎng)上購物系統(tǒng) —— 福建農(nóng)林大學計算機科學與技術 20 I n p u t a n d V e r i f y I n f o r m a t i o nG e n e r a t e N e w O r d e rN e x t [ V e r i f y = t r u e ]S t o r e O r d e r To D a t a b a s eM a i l t o C u s t o m e r 圖 7 Order 的活動圖 ? Order 的文檔 1. Input and Verify Information Customer 錄入定單詳細信息,驗 證該定單信息的真實性。 3. Store Order To Database 定單信息被存入數(shù)據(jù)庫中,同時賦予 Customer 和此定單唯一的一個客戶賬號和一個定單號碼 。 網(wǎng)上購物系統(tǒng) —— 福建農(nóng)林大學計算機科學與技術 21 P a y M o n e yS e n d i n g e r r o r I n f o r m a t i o nM o d i f y P a y m e n t a n d O r d e r S t a t u s[ O K ]U p d a t e D a t a b a s eC h e c k i n g C u s t o m e r I D A n d O r d e r I DA u d i t i n g M o n e yPa y m e n tC u st o m e r 圖 8 Verify and Accept Payment 的活動圖 ? Verify and Accept Payment 的文檔 1. Pay Money Customer 收到定單確認信息后,通過信用卡或支票完成轉帳。 3. Auditing Money 對 Customer 的實際付款金額與定單價格進行核對。 5. Modify Payment and Order Status 如 Customer 的實際付款金額與定單價格相等,對數(shù)據(jù)庫中的定單狀態(tài)信息及付款金額信息進行修改。 G e t t i n g p a y m e n t a n d O r d e r I n f o r m a t i o nG e n e r a t i n g i n v o i c eS e n d i n g i n v o i c e t o C u s t o m e r 圖 9 Print Invoice 的活動圖 ? Print Invoice 的文檔 1. Getting payment and Order Information Salesman 在 Server 頁面選擇 Invoice(或相似命名的)功能鍵來取得驗證和接收客戶付款 后 的定單詳細信息。 3. Sending invoice to Customer Salesman 發(fā)送發(fā)票給 Customer。 2. Sending Information to WareHouse Salesman 點擊 Refer(或相似命名的)功能鍵來將訂購信息提交給Warehouse。 4. Sending to Customer WareHouse 將計算機及部件發(fā)送給 Customer。 3.網(wǎng)上購物系統(tǒng)的類圖 (類建模) 網(wǎng)上購物系統(tǒng) —— 福建農(nóng)林大學計算機科學與技術 24 3. 1 系統(tǒng)類包 圖 邊界包 b o u n d a r y 控制類包 c o n t r o l 實體類包 e n t i t y 數(shù)據(jù)庫類包 d b i n t e r f a c e 3. 2 系統(tǒng)實體類關聯(lián)圖 網(wǎng)上購物系統(tǒng) —— 福建農(nóng)林大學計算機科學與技術 25 3. 3 系統(tǒng) 界面 類關聯(lián)圖 3. 4 付款行為協(xié)作類關聯(lián)圖 網(wǎng)上購物系統(tǒng) —— 福建農(nóng)林大學計算機科學與技術 26 3. 5 購買行為協(xié)作類關聯(lián)圖 網(wǎng)上購物系統(tǒng) —— 福建農(nóng)林大學計算機科學與技術 27 3. 6 送貨行為協(xié)作類關聯(lián)圖 4.構造順序圖(交互建模) 4. 1 PrintInvoice 的順序圖 : S a l e s p e r s o n : O r d e r S e r v e r W i n d o w : D a t a B a s e : I n v o i c e : C u s t o m e r1 : C r e a t e W i n d o w ( )3 : P r i n t I n v o i c e ( )2 : G e t C o m p l e t e O r d e r L i s t ( )4 : P r i n t ( )5 : S e n d I n v o i c e ( ) 網(wǎng)上購物系統(tǒng) —— 福建農(nóng)林大學計算機科學與技術 28 4. 2 StandardConfiguration 的順序圖 : C us t om e r : S t a nda r dC om p ut e r W i n dow : S t a nda r dC om p ut e r : S hop p i ng L i s t W i ndo w1: C r e a t e W i ndo w ( )2: A ddT oC a r ( )3: G e t S t a nda r dC omp ut e r I nf o( ) : M e r c ha ndi s e L i s t4: A ddM e r c ha ndi s e ( )5: C om p ut e r T ot a l C os t ( )6: D i s p l a y T ot a l C os t ( )7: G ot oS hop p i ng L i s t ( )8: C r e a t e W i ndo w ( )9: D i s p l a y S hop p i n g L i s t ( )10: M od i f y C a r ( )11: M od i f y M e r c hnd i s e L i s t ( )12: C om p ut e r T ot a l C os t ( )13: D i s p l a y S hop p i ng L i s t ( )14: G ot oI np ut O r de r W i ndo w (