Newer
Older
labs / tiddlers / content / labs / lab02 / _Labs_Lab 09_Diagrams_Invoice Class Diagram.tid
@Mark George Mark George on 12 Jul 669 bytes WIP lab 2
tags: lab02 lab hidden
title: /Labs/02/Diagrams/Invoice Class Diagram
type: text/vnd.tiddlywiki

[[plantuml[
@startuml

skinparam {
   style strictuml
   roundCorner 5
   padding 2
   nodeSep 100
   class {
      attributeIconSize 0
      fontSize 15
   }
}

class "Invoice" as invoice {
  - customerName : String
  - customerAddress : String
  - date : LocalDate
--
  +addItem(itemToAdd : InvoiceItem) : void
  +removeItem(itemToRemove : InvoiceItem) : void
  +getTotal() : Double
}

class "InvoiceItem" as item {
  - productName : String
  - salePrice : Double
  - quantityPurchased : Double
--
  + getItemTotal() : Double
}

invoice -> "-items\r*" item

@enduml
]]]