A P S DCD per NextGen POS (*) A P S Progetto per startUp (*)
Transcript
A P S DCD per NextGen POS (*) A P S Progetto per startUp (*)
A P S DCD per NextGen POS (*) Store address : Address name : Text store ProductDescription descriptions description : Text {Map} price : Money 1..* itemID: ItemID ProductCatalog addCompleteSale(...) 1 1 catalog ... getProductDesc(...) ... description 1 Sale Register ... isComplete : Boolean time : DateTime lineItems {ordered} currentSale endSale() enterItem(...) makeNewSale() makePayment(...) 1 becomeComplete() makeLineItem(...) makePayment(...) getTotal() 1..* SalesLineItem quantity : Integer getSubtotal() completedSales {ordered} Payment payment 1 amount : Money ... 54 A Luca Cabibbo – A·P·S Esempi di progettazione a oggetti con i pattern GRASP P S Progetto per startUp (*) completedSales: List<Sale> 3: create create s:Store pass a reference to the ProductCatalog and the Store to the Register, so that it has permanent visibility to it 2: create(s,pc) :Register by Creator 1: create 1.1: create pc: ProductCatalog 1.2.2*: put(id, pd) descriptions: Map<ProductDescription> 1.2.1*: create(id, price, description) 1.2: loadProdSpecs() pd: ProductDescription 63 Esempi di progettazione a oggetti con i pattern GRASP Luca Cabibbo – A·P·S