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

UML

The document describes a company class with methods to manage employees. The company class contains a vector of employee pointers and methods to calculate salaries, find employees, and output data. There are also base employee and derived manager and production worker classes defined.

Uploaded by

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

UML

The document describes a company class with methods to manage employees. The company class contains a vector of employee pointers and methods to calculate salaries, find employees, and output data. There are also base employee and derived manager and production worker classes defined.

Uploaded by

Minh Khánh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Company Employee

Date
- companyName: string # id: string
- employees: vector<Employee*> # name: string - day: int
# beginningYear: int - month: int
# basicSalary: double - year: int
# birthday: Date
+ Date();
+ Company(); + Date(d: int, m: int, y: int);
+ Company(name: const string&); + Employee()
+ Employee(id: string, name: string, + output(os: ostream&):
+ Company(company: const Company&); ostream&
+ input(is: istream&):istream& beginningYear: int, basicSalary: double)
+ Employee(employee: const Employee&) + input(is: istrean&): istream&
+ inputListEmployees(is: istream&): istream& + getMonth(): int
+ output(os: ostream&): ostream& + getClassname() const = 0: string
+ getDay(): int
+ getSumOfSalary(): double + input() const = 0: void
+ output() const = 0: void + getYear(): int
+ findTheHighestPaidEmployee(): Employee*
+ countProductionWorker(): int + getSalary() const: double
+ countOfficeWorker(): int + getName(): string
+ getAverageSalary(): double + getId(): string
+ listEmployee(os: ostream&): ostream& + getBirthday: Date
+ findEmployeeById(id: string): Employee*
+ findEmployeeByName(name: string): Employee*
+ cntEmployeeHaveBirthdayIn(month:int): int
+ ~Company();

OfficeWorker

- businessDays: int
- allowance: double
Manager
ProductionWorker
- positionAllowance: double
- bonus: double - numberOfProducts: int
+ OfficeWorker()
+ OfficeWorker(id: string, name: string,
+ ProductionWorker()
beginningYear: int, basicSalary: double,
+ Manager(); + ProductionWorker(id: string, name:
businessDays: int, allowance: double)
+ Manager(id: string, name: string, string, beginningYear: int, basicSalary:
+ OfficeWorker(officeWorker: const
beginningYear: int, basicSalary: double, double, numberOfProducts: int)
OfficeWorker&)
positionAllowance: double, bonus: + ProductionWorker(productionWorker: + getClassname() const: string
double) const ProductionWorker&)
+ input() const: void
+ Manager(manager: const Manager&) + getClassname() const: string
+ output() const: void
+ getClassname() const: string + input() const: void
+ getSalary() const: double
+ input() const: void + output() const: void
+ output() const: void + getSalary() const: double
+ getSalary() const: double

You might also like