A company has many employees & each employee is led by only 1 person
except for the CEO (who has no boss). The cost to the company of an
employee is the sum of his salary plus the cost to the company of all
the people led by him. Given is the following structure :



                 Employee



Data members:

Name

Salary

isBoss

nameOfBoss



Methods:

getSalary

getName





a)      Define the class/structure

b)      Write a function getCostToCompany() to calculate the cost to
the company of an employee whose name is passed as a parameter to the
function getCostToCompany()



     public float getCostToCompany(String name)



Note: Don’t write any input functions such as main() & assume that the
data structures have already been defined

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to