Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Design Model Use-Case realizations with GRASP Larman chapter 17.

Similar presentations


Presentation on theme: "1 Design Model Use-Case realizations with GRASP Larman chapter 17."— Presentation transcript:

1 1 Design Model Use-Case realizations with GRASP Larman chapter 17

2 2 UP artifacts and process Context

3 3 Architecture

4 4 The Domain Model and Use-Case Realizations Some objects are inspired from the Domain Model Sale as conceptual class Sale as design class –You will discover new concepts when working with the design model Some objects are completely unrelated to the Domain Model

5 5 Lowering the representation gab

6 6 System Sequence Diagram

7 7 Object Design : makeNewSale Contract CO1: MakeNewSale Operation : MakeNewSale() Cross References : Use Cases : Process Sale Preconditions : None Postconditions : A Sale instance s was created S was associated with the Register Attributes of s were initialized

8 8 Object Design : enterItem Contract CO2: enterItem Operation : enterItem(ItemID:ItemID, quantity: integer) Cross References : Use Cases : Process Sale Preconditions : There is an underway sale Postconditions : A SalesLineItem instance sli was created sli was associated with the current Sale sli.quantity became quantity Sli was associated with a ProductSpecification, based on itemID match

9 9 Object Design : endSale Contract CO3: endSale Operation : endSale() Cross References : Use Cases : Process Sale Preconditions : There is an underway sale Postconditions : Sale.isCompleted became true or with constraints, notes and algorithms ……….

10 10 Calculating the Sale Total

11 11 Object Design : makePayment Contract CO4: makePayment() Operation: makePayment(amount:Money ) Cross References : Use Cases : Process Sale Preconditions : There is an underway sale Postconditions : A Payment instance p was created P.amountTendered became amount P was associated with the current Sale The current Sale was associated with the Store

12 12 Logging a Sale Who is responsible for knowing all the logged sales, and doing the logging ?

13 13 Applications Start up public class Main { public static void main(String[] args) { // Sote is the initial domain object. // The Store creates some other domain objects Store store = new Store(); Register register = store.getRegister(); ProcessSaleJFrame frame = new ProcessSaleJFrame( register); }

14 14 Connecting the UI Layer to the Domain Layer


Download ppt "1 Design Model Use-Case realizations with GRASP Larman chapter 17."

Similar presentations


Ads by Google