freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

設(shè)計(jì)模式上機(jī)實(shí)驗(yàn)一實(shí)驗(yàn)報(bào)告-文庫(kù)吧資料

2025-03-29 12:19本頁面
  

【正文】 。 (customer==copyCustomer)。quot。quot。 Customer copyCustomer=(Customer)()。 CustomerDeepClone copyCustomerDeepClone=(CustomerDeepClone) public static void main(String a[]) { Customer customer=new Customer()。 CustomerDeepClone customerDeepClone=new CustomerDeepClone()。)。customerDeepClone==copyCustomerDeepClone?amp。 (amp。)。==?amp。 (amp。)。==?amp。}} class CustomerClient14{ (amp。} catch (ClassNotFoundException e) {()。 return(())。ByteArrayInputStream bis=newByteArrayInputStream(())。 ObjectOutputStream oos=new ObjectOutputStream(bao)。} public Object clone(){Customer clone=null。public Address getAddress() {return address。}return clone。quot。quot。try{clone=(Customer)()。} public void setAddress(Address address) { = address。}} //淺克隆的Customer類class Customer implements Cloneable{private Address address=null。quot。quot。繪制類圖并編程實(shí)現(xiàn)。()。 return new MacCPU()。quot。quot。 return new MacRAM()。quot。quot。 ()。 factory=(ComputerPartsFactory)()。 CPU cpu。 return new PcRAM()。quot。quot。 return new PcCPU()。quot。quot。RAM produceRAM()。)。MacRAMamp。}} class MacRAM implements RAM{public void discribe(){(amp。quot。quot。)。MacCPUamp。}} class MacCPU implements CPU{public void discribe(){(amp。quot。quot。 }10 void discribe()。 } } (4) 抽象工廠模式電腦配件生產(chǎn)工廠生產(chǎn)內(nèi)存、CPU等硬件設(shè)備,這些內(nèi)存、CPU的品牌、型號(hào)并不一定相同,根據(jù)下面的“產(chǎn)品等級(jí)結(jié)構(gòu)產(chǎn)品族”示意圖,使用抽象工廠模式實(shí)現(xiàn)電腦配件生產(chǎn)過程并繪制相應(yīng)的類圖,繪制類圖并編程實(shí)現(xiàn)。airCondition=()。 return new HaierAirCondition()。quot。quot。 return new MideaAirCondition()。quot。quot。 AirCondition airCondition。)。HaierAirCondition working!amp。 public void work() { } (amp。8 void work()。quot。quot。使用工廠方法模式描述該場(chǎng)景,繪制類圖并編程實(shí)現(xiàn)。()。 } catch (UnsupportedShapeException e) {()。quot。quot。 Shape triangle = null。}()。)。circleamp。try {circle = (amp。quot。quot。}else{throw new UnsupportedShapeException()。quot。quot。)) {return new Rectangle()。rectangleamp。}else if((amp。quot。quot。)。Triangle eraseing!amp。}public void erase(){(amp。quot。quot。)。Rectangle eraseing!amp。 public void erase() public void erase() {(amp。 void draw()。quot。quot。)。Circle eraseing!amp。 public void draw() { } { } (amp。quot。quot。 3 (2) 簡(jiǎn)單工廠模式使用簡(jiǎn)單工廠模式設(shè)計(jì)一個(gè)可以創(chuàng)建不同幾何形狀(Shape)的繪圖工具類,如可創(chuàng)建圓形(Circle)、方形(Rectangle)和三角形(Triangle) 對(duì)象,每個(gè)幾何圖形都要有繪制draw()和擦除erase()兩個(gè)方法,要求在繪制不支持的幾何圖形時(shí),提示一個(gè)UnsupportedShapeException,繪制類圖并編程實(shí)現(xiàn)。在進(jìn)一步分析之后,需要在LoanItem類中定義一個(gè)集合來存儲(chǔ)每一種圖書或唱碟的所有租借歷史記錄。● RentHistory(租借歷史記錄)類屬性:rno(歷史記錄編號(hào))、hireTime(出租時(shí)間)、returnTime(歸還時(shí)間)、o(客戶編號(hào))、no(租借圖書或唱碟編號(hào))、deposit(押金金額)。方法:每個(gè)屬性的get()方法和set()方法。 方法:每個(gè)屬性的get()方法和set()方法。方法:每個(gè)屬性的get()方法和set()方法。該系統(tǒng)將記錄所有的圖書信息、唱碟信息、用戶信息和用戶租借信息。2 五、實(shí)驗(yàn)結(jié)果使用PowerDesigner繪制類圖;用PowerDesigner和任意一種面向?qū)ο缶幊陶Z言實(shí)現(xiàn)簡(jiǎn)單工廠模式、工廠方法模式、抽象工廠模式、原型模式、單例模式、適配器模式、橋接模式和組合模式,包括根據(jù)實(shí)例繪制模式結(jié)構(gòu)圖、編寫模式實(shí)現(xiàn)代碼,運(yùn)行并測(cè)試模式實(shí)例代碼。三、實(shí)驗(yàn)步驟1. 熟悉PowerDesigner11的常用功能;2. 使用PowerDesigner繪制類圖;3. 使用PowerDesig
點(diǎn)擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1