a) Wite the folowng erechod definition ramed netsalary()for both subclasses that calculate and retum the net salary bose
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
a) Wite the folowng erechod definition ramed netsalary()for both subclasses that calculate and retum the net salary bose
a) Wite the folowng erechod definition ramed netsalary()for both subclasses that calculate and retum the net salary bosed on following information: The net walary for a Permanent worker is calculated based on percent paid according to grode given in Table 1 and by using the following forrula. Coedinfuftum netsalary - (salary + (yearservice * percentPaid * salary) )− socso - w.............. The net salary for a Contract worker is given based on professicral service or not if the worker is in professional senvice, the net sabary is using the foliowng forruila netsalary - salary +(20% of salary )+ 150,00 for every year of service Otherwise, the following fomma is tsed to calculate the net salary. netsalary - salary −120,00 for every year of service (8 marks) b) Using polymorphesm concept wite the program segrent that can do the following 7) Dedare the array named work that can store 50 cbpcts of Permanent and Contr act. Workers. (1 mark) (i) Caloulate and d splay the average net salary for Contract worker. (5marks) ia) Caurt and dispiay the total rumbor of grade A Permanent woker who works more than 10 years and then display the respective inlomation for every woker using tostring() method. (6 marks)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!