設(shè)計(jì)模式-軟件體系結(jié)構(gòu)-實(shí)驗(yàn)4-中南大學(xué)-軟件學(xué)院_第1頁(yè)
設(shè)計(jì)模式-軟件體系結(jié)構(gòu)-實(shí)驗(yàn)4-中南大學(xué)-軟件學(xué)院_第2頁(yè)
設(shè)計(jì)模式-軟件體系結(jié)構(gòu)-實(shí)驗(yàn)4-中南大學(xué)-軟件學(xué)院_第3頁(yè)
設(shè)計(jì)模式-軟件體系結(jié)構(gòu)-實(shí)驗(yàn)4-中南大學(xué)-軟件學(xué)院_第4頁(yè)
設(shè)計(jì)模式-軟件體系結(jié)構(gòu)-實(shí)驗(yàn)4-中南大學(xué)-軟件學(xué)院_第5頁(yè)
已閱讀5頁(yè),還剩23頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

#實(shí)驗(yàn)4結(jié)構(gòu)型設(shè)計(jì)模式實(shí)驗(yàn)1:基礎(chǔ)性2:綜合性1:必修2:選修1:基礎(chǔ)2:專業(yè)基礎(chǔ)3:設(shè)計(jì)性4:研究性)3:其它)3:專業(yè)4:其它)熟練使用PowerDesigner和任意一種面向?qū)ο缶幊陶Z(yǔ)言實(shí)現(xiàn)幾種常見(jiàn)的結(jié)構(gòu)型設(shè)計(jì)模式,包括適配器模式、組合模式和外觀模式,理解每一種設(shè)計(jì)模式的模式動(dòng)機(jī),掌握模式結(jié)構(gòu),學(xué)習(xí)如何使用代碼實(shí)現(xiàn)這些模式。二、實(shí)驗(yàn)內(nèi)容1.現(xiàn)有一個(gè)接口DataOperation定義了排序方法sort(int[])和查找方法search(int[],int),已知類Quicksort的quickSort(int[])方法實(shí)現(xiàn)了快速排序算法,類BinarySearch的binarySearch(int[],int)方法實(shí)現(xiàn)了二分查找算法。試使用適配器模式設(shè)計(jì)一個(gè)系統(tǒng),在不修改源代碼的情況下將類Quicksort和類BinarySearch的方法適配到DataOperation接口中。繪制類圖并編程實(shí)現(xiàn)。(要求實(shí)現(xiàn)快速排序和二分查找,使用對(duì)象適配器實(shí)現(xiàn))2.WindowsMediaPlayer和RealPlayer是兩種常用的媒體播放器,它們的API結(jié)構(gòu)和調(diào)用方法存在區(qū)別?,F(xiàn)在你的應(yīng)用程序需要支持這兩種播放器API,而且在將來(lái)可能還需要支持新的媒體播放器,請(qǐng)問(wèn)如何設(shè)計(jì)該應(yīng)用程序?繪制類圖并編程模擬實(shí)現(xiàn)。3?使用組合模式設(shè)計(jì)一個(gè)殺毒軟件(AntiVirus)的框架,該軟件既可以對(duì)某個(gè)文件夾(Folder)殺毒,也可以對(duì)某個(gè)指定的文件(File)進(jìn)行殺毒,文件種類包括文本文件TextFile、圖片文件ImageFile、視頻文件VideoFile。繪制類圖并編程模擬實(shí)現(xiàn)。某教育機(jī)構(gòu)組織結(jié)構(gòu)如下圖所示:在該教育機(jī)構(gòu)的OA系統(tǒng)中可以給各級(jí)辦公室下發(fā)公文,試采用組合模式設(shè)計(jì)該機(jī)構(gòu)的組織結(jié)構(gòu),繪制相應(yīng)的類圖并編程模擬實(shí)現(xiàn),在客戶端代碼中模擬下發(fā)公文。某軟件公司為新開(kāi)發(fā)的智能手機(jī)控制與管理軟件提供了一鍵備份功能,通過(guò)該功能可以將原本存儲(chǔ)在手機(jī)中的通信錄、短信、照片、歌曲等資料一次性全部拷貝到移動(dòng)存儲(chǔ)介質(zhì)(例如MMC卡或SD卡)中。在實(shí)現(xiàn)過(guò)程中需要與多個(gè)已有的類進(jìn)行交互,例如通訊錄管理類、短信管理類等,為了降低系統(tǒng)的耦合度,試使用外觀模式來(lái)設(shè)計(jì)并編程模擬實(shí)現(xiàn)該一鍵備份功能。某信息系統(tǒng)需要提供一個(gè)數(shù)據(jù)處理和報(bào)表顯示模塊,該模塊可以讀取不同類型的文件中的數(shù)據(jù)并將數(shù)據(jù)轉(zhuǎn)換成XML格式,然后對(duì)數(shù)據(jù)進(jìn)行統(tǒng)計(jì)分析,最后以報(bào)表方式來(lái)顯示數(shù)據(jù)。由于該過(guò)程需要涉及到多個(gè)類,試使用外觀模式設(shè)計(jì)該數(shù)據(jù)處理和報(bào)表顯示模塊??紤]到有些文件本身已經(jīng)是XML格式,無(wú)須進(jìn)行格式轉(zhuǎn)換,為了讓系統(tǒng)具有更好的擴(kuò)展性,在系統(tǒng)設(shè)計(jì)中可以引入抽象外觀類。三、實(shí)驗(yàn)要求結(jié)合實(shí)例,正確無(wú)誤地繪制適配器模式、組合模式和外觀模式的模式結(jié)構(gòu)圖;使用任意一種面向?qū)ο缶幊陶Z(yǔ)言實(shí)現(xiàn)適配器模式、組合模式和外觀模式實(shí)例,代碼運(yùn)行正確無(wú)誤。四、實(shí)驗(yàn)步驟結(jié)合實(shí)例,使用PowerDesigner繪制適配器模式實(shí)例結(jié)構(gòu)圖并用面向?qū)ο缶幊陶Z(yǔ)言實(shí)現(xiàn)該模式實(shí)例;結(jié)合實(shí)例,使用PowerDesigner繪制適配器模式實(shí)例結(jié)構(gòu)圖并用面向?qū)ο缶幊陶Z(yǔ)言實(shí)現(xiàn)該模式實(shí)例;結(jié)合實(shí)例,使用PowerDesigner繪制組合模式實(shí)例結(jié)構(gòu)圖并用面向?qū)ο缶幊陶Z(yǔ)言實(shí)現(xiàn)該模式實(shí)例;結(jié)合實(shí)例,使用PowerDesigner繪制組合模式實(shí)例結(jié)構(gòu)圖并用面向?qū)ο缶幊陶Z(yǔ)言實(shí)現(xiàn)該模式實(shí)例;結(jié)合實(shí)例,使用PowerDesigner繪制外觀模式實(shí)例結(jié)構(gòu)圖并用面向?qū)ο缶幊陶Z(yǔ)言實(shí)現(xiàn)該模式實(shí)例;結(jié)合實(shí)例,使用PowerDesigner繪制外觀模式實(shí)例結(jié)構(gòu)圖并用面向?qū)ο缶幊陶Z(yǔ)言實(shí)現(xiàn)該模式實(shí)例。五、實(shí)驗(yàn)結(jié)果1.類圖:

DataOperation+sort(intiArray[]):voidQuicksortF+quicksort(intiArray[])voidBinarySearchQuicksortF+quicksort(intiArray[])voidBinarySearchAdapter-qSort:Quicksort-bSearch:BinarySearch+<<Constructor>>Adapter()+sort(intiArray[]):void+search(intiArray[],inttarget)int+binarySearch(intiArray[],inttargetjnt實(shí)現(xiàn)代碼:importutil.XMLUtil;publicclassClient{publicstaticvoidmain(String[]args){DataOperationdataOperation=(DataOperation)XMLUtil.getBean();intiArray[]={1,3,2,5,4};booleanresult=dataOperation.search(iArray,9);for(inti=0;i<5;i++){System.out.println(iArray[i]);}System.out.println(result);}}publicinterfaceDataOperation{publicvoidsort(int[]iArray);publicbooleansearch(int[]iArray,inttarget);}publicclassDataOperationAdapterimplementsDataOperation{privateQuicksortqSort;privateBinarySearchbSearch;publicDataOperationAdapter。{qSort=newQuickSort();bSearch=newBinarySearch();}@Overridepublicvoidsort(int[]iArray){qSort.quickSort(iArray);}@Overridepublicbooleansearch(int[]iArray,inttarget){returnbSearch.binarySearch(iArray,target);}}publicclassBinarySearch{publicbooleanbinarySearch(int[]iArray,inttarget){(newQuickSort()).quickSort(iArray);if(bSearch(iArray,target,0,iArray.length-1)==-1){returnfalse;}returntrue;}publicintbSearch(int[]iArray,inttarget,intlow,inthigh){if(low>high){return-1;}intmid=(high+low)/2;if(iArray[mid]==target){returnmid;}elseif(iArray[mid]<target){returnbSearch(iArray,target,mid+1,high);}elseif(iArray[mid]>target){returnbSearch(iArray,target,low,mid-1);}else{return-1;}}}publicclassQuickSort{publicvoidquickSort(int[]iArray){sort(iArray,0,iArray.length-1);}publicvoidsort(intarr[],intlow,inthigh){intl=low;inth=high;intpovit=arr[low];while(l<h){while(l<h&&arr[h]>=povit)h--;if(l<h){inttemp=arr[h];arr[h]=arr[l];arr[l]=temp;1++;}while(l<h&&arr[l]<=povit)l++;if(l<h){inttemp=arr[h];arr[h]=arr[l];arr[l]=temp;h--;}}//print(arr);//System.out.print("l="+(l+1)+"h="+(h+1)+"povit="+povit//+"\n");if(l>low)sort(arr,low,h-1);if(h<high)sort(arr,l+1,high);}}packageutil;importjava.io.File;importjava.io.IOException;importjavax.xml.parsers.DocumentBuilder;importjavax.xml.parsers.DocumentBuilderFactory;importjavax.xml.parsers.ParserConfigurationException;importorg.w3c.dom.Document;importorg.w3c.dom.Node;importorg.w3c.dom.NodeList;importorg.xml.sax.SAXException;publicclassXMLUtil{publicstaticObjectgetBean(){try{〃創(chuàng)建DOM文檔對(duì)象DocumentBuilderFactorydocFactory=DocumentBuilderFactory.newInstance();DocumentBuilderdocBuilder=docFactory.newDocumentBuilder();Documentdocument=docBuilder.parse(newFile("config.xml"));〃獲取包含類名的文本節(jié)點(diǎn)NodeListnl=document.getElementsByTagName("className");NodeclassNode=nl.item(O).getFirstChild();StringclassName=classNode.getNodeValue();〃通過(guò)類名生成實(shí)例對(duì)象并將其返回@SuppressWarnings("rawtypes")Classclazz=Class.forName(className);Objectobj=clazz.newInstance();returnobj;}catch(ParserConfigurationExceptione){e.printStackTrace();}catch(SAXExceptione){e.printStackTrace();}catch(IOExceptione){e.printStackTrace();}catch(ClassNotFoundExceptione){e.printStackTrace();}catch(InstantiationExceptione){e.printStackTrace();}catch(IllegalAccessExceptione){e.printStackTrace();}returnnull;}}<?xmlversion="1.0"encoding="UTF-8"?>vxml-body>vclassName>DataOperationAdapterv/className>v/xml-body>2.類圖:實(shí)現(xiàn)代碼:importutil.XMLUtil;publicclassClient{publicstaticvoidmain(String[]args){Playerplayer=(Player)XMLUtil.getBean();player.play();publicinterfacePlayer{voidplay();publicclassRealPlayerAdapterimplementsPlayer{publicRealPlayerrealPlayer;publicRealPlayerAdapter(){realPlayer=newRealPlayer();}publicvoidplay(){realPlayer.play();}}publicclassRealPlayer{publicvoidplay(){System.out.println("RealPlayer...");}}publicclassWMPlayerAdapterimplementsPlayer{publicWindowsMediaPlayerwindowsMediaPlayer;publicWMPlayerAdapter(){WindowsMediaPlayer=newWindowsMediaPlayer。;}publicvoidplay(){windowsMediaPlayer.play();}}publicclassWindowsMediaPlayer{publicvoidplay(){System.out.println("WindowsMediaPlayer...");}}packageutil;importjava.io.File;importjava.io.IOException;importjavax.xml.parsers.DocumentBuilder;importjavax.xml.parsers.DocumentBuilderFactory;importjavax.xml.parsers.ParserConfigurationException;importorg.w3c.dom.Document;importorg.w3c.dom.Node;importorg.w3c.dom.NodeList;importorg.xml.sax.SAXException;publicclassXMLUtil{publicstaticObjectgetBean(){try{〃創(chuàng)建DOM文檔對(duì)象DocumentBuilderFactorydocFactory=DocumentBuilderFactory.newInstance();DocumentBuilderdocBuilder=docFactory.newDocumentBuilder();Documentdocument=docBuilder.parse(newFile("config.xml"));〃獲取包含類名的文本節(jié)點(diǎn)NodeListnl=document.getElementsByTagName("className");NodeclassNode=nl.item(O).getFirstChild();StringclassName=classNode.getNodeValue();〃通過(guò)類名生成實(shí)例對(duì)象并將其返回@SuppressWarnings("rawtypes")Classclazz=Class.forName(className);Objectobj=clazz.newInstance();returnobj;}catch(ParserConfigurationExceptione){e.printStackTrace();}catch(SAXExceptione){e.printStackTrace();}catch(IOExceptione){e.printStackTrace();}catch(ClassNotFoundExceptione){e.printStackTrace();}catch(InstantiationExceptione){e.printStackTrace();}catch(IllegalAccessExceptione){e.printStackTrace();}

}retumnuII;<?xmlv……<xml-body>vclassName>WMPlayerAdapterv/className></xml-body>3.類圖:AbstractFile{abstract}#name:String+antivirus():void+add(AbstractFileabstractFile):void+remove(AbstractFileabstractFile)voidTextFileVideoFileTextFile++++++++++TextFile(Stringname)antivirus():voidadd(AbstractFileabstractFile):voidremove(AbstractFileabstractFile)voidVideoFile(Stringname)antivirus():voidadd(AbstractFileabstractFile):voidremove(AbstractFileabstractFile)voidFolder++++ImageFile(Stringname)antivirus()Folder++++ImageFile(Stringname)antivirus():voidadd(AbstractFileabstractFile):voidremove(AbstractFileabstractFile)void++++fileList:ArrayList<AbstractFile>antivirus()add(AbstractFileabstractFile)remove(AbstractFileabstractFile)voidFolder(Stringname)voidvoidImageFile實(shí)現(xiàn)代碼:publicclassClient{publicstaticvoidmain(String[]args){AbstractFilekejian=newFolder('課件”);AbstractFiledasan=newFolder("大三課件");AbstractFileshejimoshi=newFolder("設(shè)計(jì)模式");AbstractFileshiyanyaoqiu=newTextFile('實(shí)驗(yàn)要求");AbstractFileliucheng=newImageFile(”實(shí)驗(yàn)流程圖”);AbstractFileshinian=newVideoFile('十年video");AbstractFilesjkejian=newTextFile('設(shè)計(jì)模式課件”);AbstractFileshiyanbaogao=newFolder('實(shí)驗(yàn)報(bào)告”);AbstractFileshiyanbaogaol=newTextFile('設(shè)計(jì)模式實(shí)驗(yàn)報(bào)告1");AbstractFileshiyanbaogao2=newTextFile('設(shè)計(jì)模式實(shí)驗(yàn)報(bào)告2");AbstractFileshiyanbaogao3=newTextFile('設(shè)計(jì)模式實(shí)驗(yàn)報(bào)告3");AbstractFileshiyanbaogao4=newTextFile('設(shè)計(jì)模式實(shí)驗(yàn)報(bào)告4");kejian.add(dasan);dasan.add(shejimoshi);shejimoshi.add(shiyanyaoqiu);shejimoshi.add(liucheng);shejimoshi.add(shinian);shejimoshi.add(sjkejian);shejimoshi.add(shiyanbaogao);shiyanbaogao.add(shiyanbaogao1);shiyanbaogao.add(shiyanbaogao2);shiyanbaogao.add(shiyanbaogao3);shiyanbaogao.add(shiyanbaogao4);kejian.antivirus();}}publicabstractclassAbstractFile{protectedStringname;publicabstractvoidantivirus();publicabstractvoidadd(AbstractFileabstractFile);publicabstractvoidremove(AbstractFileabstractFile);importjava.util.ArrayList;publicclassFolderextendsAbstractFile{privateArrayList<AbstractFile>fileList;publicFolder(Stringname){=name;fileList=newArrayList<AbstractFile>();}@Overridepublicvoidantivirus(){System.out.println(name+"antivirus(Folder)");for(AbstractFilefile:fileList){file.antivirus();}}@Overridepublicvoidadd(AbstractFileabstractFile){fileList.add(abstractFile);}@Overridepublicvoidremove(AbstractFileabstractFile){fileList.remove(abstractFile);}publicclassImageFileextendsAbstractFile{publicImageFile(Stringname){=name;}@Overridepublicvoidantivirus(){System.out.println(name+"antivirus(ImageFile)");}@Overridepublicvoidadd(AbstractFileabstractFile){System.out.println("youcan'tusethismethod!");}@Overridepublicvoidremove(AbstractFileabstractFile){System.out.println("youcan'tusethismethod!");}}publicclassTextFileextendsAbstractFile{publicTextFile(Stringname){=name;}@Overridepublicvoidantivirus(){System.out.println(name+"antivirus(TextFile)");@Overridepublicvoidadd(AbstractFileabstractFile){System.out.println("youcan'tusethismethod!");}@Overridepublicvoidremove(AbstractFileabstractFile){System.out.println("youcan'tusethismethod!");}}publicclassVideoFileextendsAbstractFile{publicVideoFile(Stringname){=name;}@Overridepublicvoidantivirus(){System.out.println(name+"antivirus(VideoFile)");}@Overridepublicvoidadd(AbstractFileabstractFile){System.out.println("youcan'tusethismethod!");}@Overridepublicvoidremove(AbstractFileabstractFile){System.out.println("youcan'tusethismethod!");}}4.類圖:AbstractDepartment{abstract}#name:String+send(Stringcontent):void+add(AbstractDepartmentdepartment):void+remove(AbstractDepartmentdepartment:)void...Office+send(Stringcontent)Office+send(Stringcontent):void+add(AbstractDepartmentdepartment):void+remove(AbstractDepartmentdepartment)void+<<Constructor>>Office()Department-departmentList:ArrayList<Department>+<<Constructor>>Department()+send(Stringcontent):void+add(AbstractDepartmentdepartment):void+remove(AbstractDepartmentdepartment:)void實(shí)現(xiàn)代碼:publicclassClient{publicstaticvoidmain(String[]args){AbstractDepartmentBJ=newDepartment("北京總部");AbstractDepartmentBJJWOffice=newOffice("北京教務(wù)辦公室");AbstractDepartmentHN=newDepartment^湖南分校");AbstractDepartmentBJXZOffice=newOffice("北京行政辦公室”);AbstractDepartmentHNJWOffice=newOffice('湖南教務(wù)辦公室");AbstractDepartmentCS=newDepartment^長(zhǎng)沙教學(xué)點(diǎn)");AbstractDepartmentXT=newDepartment^湘潭教學(xué)點(diǎn)");AbstractDepartmentHNXZOffice=newOffice^湖南行政辦公室");AbstractDepartmentCSJWOffice=newOffice('長(zhǎng)沙教務(wù)辦公室");AbstractDepartmentCSXZOffice=newOffice('長(zhǎng)沙行政辦公室");AbstractDepartmentXTJWOffice=newOffice("湘潭教務(wù)辦公室");AbstractDepartmentXTXZOffice=newOffice("湘潭行政辦公室");BJ.add(BJJWOffice);BJ.add(HN);BJ.add(BJXZOffice);HN.add(HNJWOffice);HN.add(CS);HN.add(XT);HN.add(HNXZOffice);CS.add(CSJWOffice);CS.add(CSXZOffice);XT.add(XTJWOffice);XT.add(XTXZOffice);BJ.send("明天來(lái)北京總部開(kāi)戶!”);}}publicabstractclassAbstractDepartment{protectedStringname;publicabstractvoidsend(Stringcontent);publicabstractvoidadd(AbstractDepartmentdepartment);publicabstractvoidremove(AbstractDepartmentdepartment);}importjava.util.ArrayList;publicclassDepartmentextendsAbstractDepartment{privateArrayList<AbstractDepartment>departmentList;publicDepartment(Stringname){departmentList=newArrayList<AbstractDepartment>();=name;}@Overridepublicvoidsend(Stringcontent){for(AbstractDepartmentdepartment:departmentList){System.out.println(name+"send"+content+"toitsnextdepartment"+);department.send(content);}}@Overridepublicvoidadd(AbstractDepartmentdepartment){departmentList.add(department);}@Overridepublicvoidremove(AbstractDepartmentdepartment){departmentList.remove(department);}}publicclassOfficeextendsAbstractDepartment{publicOffice(Stringname){=name;}@Overridepublicvoidsend(Stringcontent){System.out.println("youcan'tusethismethod!");}@Overridepublicvoidadd(AbstractDepartmentdepartment){System.out.println("youcan'tusethismethod!");

}@Overridepublicvoidremove(AbstractDepartmentdepartment){System.out.println("youcan'tusethismethod!");}}5.類圖:phoneBookManager.backup();messageManager.backup();pictureManager.backup();songManager.backup();phoneBookManager.backup();messageManager.backup();pictureManager.backup();songManager.backup();BackupFacade-phoneBookManager:PhoneBookManager-messageManager:MessageManager-pictureManager:PictureManager-songManager:SongManager+backup():void+<<Constructor>>BackupFacade(){PhoneBookManageMessageManager+backup():void+backup():void實(shí)現(xiàn)代碼:publicclassClient{publicstaticvoidmain(String[]args){BackupFacadebackupFacade=newBackupFacade。;backupFacade.backup();}}publicclassBackupFacade{privatePhoneBookManagerphoneBookManager;privateMessageManagermessageManager;privatePictureManagerpictureManager;privateSongManagersongManager;publicBackupFacade(){phoneBookManager=newPhoneBookManager();messageManager=newMessageManager();pictureManager=newPictureManager();songManager=newSongManager();}publicvoidbackup(){System.out.println(”備份中");phoneBookManager.backup();messageManager.backup();pictureManager.backup();songManager.backup();System.out.println("備份完成。。。");}}publicclassPhoneBookManager{publicvoidbackup(){System.out.println("PhoneBookbackup");}}publicclassMessageManager{publicvoidbackup(){System.out.println("Messagebackup");}}publicclassPictureManager{publicvoidbackup。{System.out.println("Picturebackup");}}publicclassSongManager{publicvoidbackup(){System.out.println("Songbackup");}}6.類圖:DataProcessingAbstractFacade+process():voidDataProcessingFacadel-reader:Reader-transformer:DataProcessingFacadel-reader:Reader-transformer:Transformer-StatisticalContainerStatisticalContainer-DisplayContainer:DisplayContainerDataProcessingFacade2-reader:Reader-StatisticalContainerStatisticalContainer-DisplayContainer:DisplayContainer+process():void+<<Constructor>>DataProcessingFacade2()+process():void+<<Constructor>>DataProcessingFacadel()ReaderTransformerStatisticalContainerDisplayContainer+read():void+toXML():void+statistics():void+display():void實(shí)現(xiàn)代碼:importutil.XMLUtil;publicclassClient{publicstaticvoidmain(String[]args){DataProcessingAbstractFacadedataProcessingAbstractFacade;dataProcessingAbstractFacade=(DataProcessingAbstractFacade)XMLUtil.getBean();dataProcessingAbstractFcess();}}publicinterfaceDataProcessingAbstractFacade{voidprocess();}publicclassDataProcessingFacadelimplementsDataProcessingAbstractFacade{publicReaderreader;publicTransformertransformer;publicStatisticalContainerstatisticalContainer;publicDisplayContainerdisplayContainer;publicDataProcessingFacade1(){reader=newReader();transformer=newTransformer。;statisticalContainer=newStatisticalContainer();displayContainer=newDisplayContainer();}publicvoidprocess(){System.out.println("usingDataProcessingFacade2");reader.read();transformer.toXML();statisticalContainer.statistics();displayContainer.display();}}publicclassDataProcessingFacade2implementsDataProcessingAbstractFacade{publicReaderreader;publicStatisticalContainerstatisticalContainer;publicDisplayContainerdisplayContainer;publicDataProcessingFacade2(){reader=newReader();statisticalContainer=newStatisticalContainer();displayContainer=newDisplayContainer();}publicvoidprocess。{System.out.println("usingDataProcessingFacade2");reader.read();statisticalContainer.statistics();displayContainer.

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論