0% found this document useful (0 votes)
17 views1 page

Code

The document presents a class diagram for a retail management system, defining the relationships between various classes such as User, Admin, Manager, Cashier, Product, Sale, SaleItem, and Supplier. It illustrates the hierarchy of users and their respective functionalities, as well as the management of products and sales. Key relationships include managers overseeing products and suppliers, cashiers processing sales, and sales containing multiple sale items.

Uploaded by

Devil's Gaming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

Code

The document presents a class diagram for a retail management system, defining the relationships between various classes such as User, Admin, Manager, Cashier, Product, Sale, SaleItem, and Supplier. It illustrates the hierarchy of users and their respective functionalities, as well as the management of products and sales. Key relationships include managers overseeing products and suppliers, cashiers processing sales, and sales containing multiple sale items.

Uploaded by

Devil's Gaming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

classDiagram

class User {
<<Abstract>>
-userId
-username
+login()
+logout()
}
class Admin {
+createUser()
}
class Manager {
+addProduct()
+updateStock()
+viewReports()
}
class Cashier {
+createSale()
}
class Product {
-productId
-name
-price
-quantityInStock
+updateStock(int quantity)
}
class Sale {
-saleId
-totalAmount
+calculateTotal()
}
class SaleItem {
-quantity
-priceAtSale
}
class Supplier {
-supplierId
-name
}

User <|-- Admin


User <|-- Manager
User <|-- Cashier

Manager "1" -- "0..*" Product : manages


Manager "1" -- "0..*" Supplier : manages
Cashier "1" -- "1..*" Sale : processes
Sale "1" -- "1..*" SaleItem : contains
Product "1" -- "0..*" SaleItem : is a
Supplier "1" -- "1..*" Product : supplies

You might also like