0
A company pays its employee on a daily basis.The company has 3 types of employees: Manager Employee: Who are paid monthly salary plus the commission earned by manager. (salary+commission). Sales Person: Who are paid commission based on sales(commission*sales) Wage Employee: Who are paid salary on hourly basis plus the commission(commission+hr*rate)
3 Antworten
+ 1
You shouldn't try to put everything in the title.
0
omidirani
0
u can create a class Company where u cant h method salary..
and then create another class manager etc .. extends compony class .. write sallary method again but with different parameters . do the same for sales person and wage employee .. now u hv inherited frm company class and hv polymorphism on sallry method.. enjoy !!