C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

cost 2 company problem ....

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
cool_lover_boy007@yahoo.c
Guest





PostPosted: Mon Aug 07, 2006 9:10 am    Post subject: cost 2 company problem .... Reply with quote



pls send me the sol'n of this question in c/c++.(
intelligent_smarty143 (AT) yahoo (DOT) co.in)


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)
Back to top
Markus Moll
Guest





PostPosted: Mon Aug 07, 2006 9:10 am    Post subject: Re: cost 2 company problem .... Reply with quote



Hello

cool_lover_boy007 (AT) yahoo (DOT) co.in wrote:

Quote:
pls send me the sol'n of this question in c/c++.(
intelligent_smarty143 (AT) yahoo (DOT) co.in)

What's the email address of your teacher so that we can send the solution
directly to him?

[homework assignment snipped]

Markus
Back to top
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
 


Powered by phpBB © 2001, 2006 phpBB Group