---
# System prepended metadata

title: Class Diagram

---

Class Diagram
===
```pla
classDiagram
  Customer <|-- PremiumCustomer
  Customer <|-- RegularCustomer
  Customer : custName: String
  Customer : custID: String
  Customer : custPhNum: int
  Customer: purchaseItem()
  Customer: requestBill()
  Customer: enterCustDetail()

  PremiumCustomer : premiumDiscount: int
  PremiumCustomer: enterCustDetail()

  RegularCustomer : regularDiscount: int
  RegularCustomer: enterCustDetail()

  Customer"1" *-- "1"Address: Has
  Address : street: String 
  Address : city: String 
  Address : state: String 
  Address : zipcode: int 
  Address: enterStreet()
  Address: enterCity()
  Address: enterState()
  Address: enterZipcode()

  Customer"1" -- "*"Product: Is Sold To
  Product : productID: int
  Product : productName: String
  Product : productPrice: Float
  Product: getPrice()
  Product: setPrice()
  Product -- PurchaseDetail

  Customer -- PurchaseDetail
  PurchaseDetail : custID: int
  PurchaseDetail : quaranty: int
  PurchaseDetail : purchaseDate: Date
  PurchaseDetail : productID: int
  PurchaseDetail: calculateTotalAmt()
  PurchaseDetail: generatePurchaseList()

  Bill --o Customer: Belongs to
  Bill : payableAmt
  Bill: calculatePayableAmt()
  Bill: generateBill()

  Bill ..>Discount
  Discount : discountType
  Discount : discountValue
  Discount: SelectDiscount()

  Discount..>PurchaseDetail
  Bill..>PurchaseDetail

  Bill..|> PaymentCounter: Accepts
  
  class PaymentCounter{
    << interface >>
    calculatePayableAmt()
    generateBill()	
 }
		
```