Medium
Manager Is an Employee
Employee(name, salary) has
pay() = salary. Manager(Employee) adds a bonus and overrides pay() to salary + bonus. Read lines e name salary or m name salary bonus until END and print each name and pay, then the total payroll.Input
Lines, then END.
Output
One line each, then the total.
Sample 1
Input
e Mim 30000 m Rafi 50000 10000 END
Output
Mim 30000 Rafi 60000 Total 90000
Sample 2
Input
e A 1 END
Output
A 1 Total 1
Output appears here