0% found this document useful (0 votes)
4 views3 pages

uml_code

The document outlines a UML class diagram for a restaurant management system, detailing the relationships and responsibilities of various classes such as User, Customer, Employee, and Manager. It includes functionalities for order management, dish preparation, and payment methods, along with promotions and branch management. The diagram illustrates inheritance and associations among classes, emphasizing the structure of the system.

Uploaded by

pejij2004
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)
4 views3 pages

uml_code

The document outlines a UML class diagram for a restaurant management system, detailing the relationships and responsibilities of various classes such as User, Customer, Employee, and Manager. It includes functionalities for order management, dish preparation, and payment methods, along with promotions and branch management. The diagram illustrates inheritance and associations among classes, emphasizing the structure of the system.

Uploaded by

pejij2004
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
You are on page 1/ 3

@startuml

' Abstract class User


abstract class User {
- userId : String
- name : String
- email : String
- phone : String
+ login()
+ logout()
}

class Customer {
- address : String
+ placeOrder()
+ rateDish(dish: Dish, rating: int)
+ rateBranch(branch: Branch, rating: int)
}

abstract class Employee {


- employeeId : String
- role : String
+ performDuty()
}

class Chef {
+ prepareDish(order: Order)
}

class DeliveryStaff {
+ deliverOrder(order: Order)
}

class Manager {
+ manageBranch(branch: Branch)
}

class Order {
- orderId : String
- orderDate : Date
- status : OrderStatus
- totalPrice : double
+ updateStatus(status: OrderStatus)
+ calculateTotal()
}

class Dish {
- dishId : String
- name : String
- price : double
+ prepare()
}

class Category {
- categoryId : String
- name : String
}
class Branch {
- branchId : String
- location : String
+ getMenu()
+ addEmployee(emp: Employee)
+ addEquipment(equip: Equipment)
+ addTable(table: Table)
}

class Equipment {
- equipmentId : String
- type : String
}

class Table {
- tableId : String
- capacity : int
}

abstract class Promotion {


- promotionId : String
- description : String
+ applyDiscount(order: Order)
}

class DishPromotion {
- dish : Dish
+ applyDiscount(order: Order)
}

class OrderPromotion {
+ applyDiscount(order: Order)
}

interface PaymentMethod {
+ pay(amount: double)
}

class CashPayment {
+ pay(amount: double)
}

class CardPayment {
- cardNumber : String
+ pay(amount: double)
}

' Inheritance
User <|-- Customer
User <|-- Employee
Employee <|-- Chef
Employee <|-- DeliveryStaff
Employee <|-- Manager
Promotion <|-- DishPromotion
Promotion <|-- OrderPromotion
PaymentMethod <|.. CashPayment
PaymentMethod <|.. CardPayment

' Associations
Branch "1" o-- "*" Employee
Branch "1" o-- "*" Equipment
Branch "1" o-- "*" Table
Order "*" --> "1" Customer
Order "*" --> "*" Dish
Dish "*" --> "1" Category

@enduml

You might also like