49 lines
No EOL
1.1 KiB
Text
49 lines
No EOL
1.1 KiB
Text
@startuml
|
|
abstract class Employee {
|
|
-string name
|
|
-Gender gender
|
|
-string department
|
|
+string Name [readonly]
|
|
+Gender Gender [readonly]
|
|
+string Department [readonly]
|
|
+{abstract} decimal Salary [readonly]
|
|
+Employee(string, Gender, string)
|
|
+override string ToString()
|
|
}
|
|
|
|
enum Gender {
|
|
Male
|
|
Female
|
|
Divers
|
|
}
|
|
|
|
class Worker {
|
|
-decimal hoursWorked
|
|
-decimal wagePerHour
|
|
+decimal HoursWorked [readonly]
|
|
+decimal WagePerHour [readonly]
|
|
+override decimal Salary [readonly]
|
|
+Worker(string, Gender, string, decimal, decimal)
|
|
+Worker(string, string, decimal, decimal)
|
|
+override string ToString()
|
|
}
|
|
|
|
class OfficeEmployee {
|
|
-decimal monthlySalary
|
|
+decimal MonthlySalary [readonly]
|
|
+override decimal Salary [readonly]
|
|
+OfficeEmployee(string, Gender, string, decimal)
|
|
+override string ToString()
|
|
}
|
|
|
|
class Manager {
|
|
+override decimal Salary [readonly]
|
|
+Manager(string, string, decimal)
|
|
+override string ToString()
|
|
}
|
|
|
|
Employee <|-- Worker
|
|
Employee <|-- OfficeEmployee
|
|
OfficeEmployee <|-- Manager
|
|
Employee -- Gender
|
|
@enduml |