Made the class diagram
This commit is contained in:
parent
ff2939894e
commit
532c17ddd3
1 changed files with 49 additions and 0 deletions
49
ClassDiagram.puml
Normal file
49
ClassDiagram.puml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
@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
|
||||
Loading…
Add table
Add a link
Reference in a new issue