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)

15th Sep 2016, 8:23 AM
ASTHA SINGH
ASTHA SINGH - avatar
3 Answers
+ 1
You shouldn't try to put everything in the title.
15th Sep 2016, 9:51 AM
Zen
Zen - avatar
0
omidirani
15th Sep 2016, 9:02 AM
Ű§Ù…ÛŒŰ± ŰšÛŒÚŻÛŒ
Ű§Ù…ÛŒŰ± ŰšÛŒÚŻÛŒ - avatar
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 !!
16th Sep 2016, 8:08 AM
Bhushan Gaikwad
Bhushan Gaikwad - avatar