• Ask Question
  • Propose Category
  • Interview eBook
  • Geek Forums
  • Online Learning
  • Online Quiz
  • Site Updates
  • User Login
    • Login



      Lost Password
      Click here to get activation email.

  • 06-13-2025
GeekInterview.com
  • Interview Questions
    • Fundamentals
      • Concepts
      • General
      • Management
      • Accounting
    • Operating System
      • Operating System
      • Android
      • iOS
      • Microsoft
    • Coding
      • Programming
      • J2EE
      • Languages
    • Database
      • Database
      • Data Warehousing
      • Oracle
    • Applications
      • Applications
      • Clarify CRM
      • Oracle Apps
      • Peoplesoft
      • Siebel
    • Software Testing
      • Testing
      • Testing Tools
    • Miscelleanous
      • Helpdesk
      • Mainframe
      • Networking
      • SAP R/3
      • Web
  • Interview Coaching
    • Career Counseling
    • Job Interview
  • Interview eBooks
    • Accounting eBook
    • C eBook
    • Citrix eBook
    • Job Interview eBook
  • Career Advice
    • Career Change
    • Jobs Help
    • Projects
    • Requests
    • Resume Help
    • Training Advice
  • Engineering
    • Chemical Engineering
    • Civil Engineering
    • Electrical Engineering
    • Electronics Engineering
    • Micro Processor
    • Mechanical Engineering
  • By Company
  • Ask Question
  • Home
  • tosumitagarwal Answers

Answered Questions

  • Oct 16 2007
    04:06 AM

    2456
    6

    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 :EmployeeData members:NameSalaryisBossnameOfBossMethods:getSalarygetNamea) Define the class/structureb) 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.

    • zaid

    madhur_agarwal

    profile Profileanswers Answers by madhur_agarwalquestions Questions by madhur_agarwal

    • Feb 18th, 2011

    The solutions given here already are wrong. They just do the opposite of what is needed. e.g. in the solution, if you call out the salary for ceo, that comes 10.0 and if you call out salary for devedr...

    ephemeral89

    profile Profileanswers Answers by ephemeral89questions Questions by ephemeral89

    • Jun 25th, 2010

    This is a classic example of a situation where you can use Trees data structure. I have not solved the problem yet but believe this can be done using very efficiently using Tress and there traversal algorithms...

    Answer Question  Select Best Answer

Subscribe To RSS Feed

Tags Cloud

Company Interviews
  • Accenture (52)
    • Aptitude Interview Questions
    • Group Discussions Topics
    • Placement Assistance
  • Adobe (7)
    • Placement Assistance
  • AMD (1)
    • Placement Assistance
  • AMDOC (2)
    • Placement Assistance
  • Axes-Technologies (25)
    • Computer Awareness Questions
  • Aztec-Systems (15)
    • Aptitude Interview Questions
    • C Interview Questions
  • BirlaSoft (26)
    • Languages Interview Questions
  • Cisco (35)
    • Micro Processor Interview Questions
  • Cognizant (1)
    • Placement Assistance
  • Dell (22)
    • Aptitude Interview Questions
  • GE (2)
    • Placement Assistance
  • HAL (1)
    • Placement Assistance
  • Infosys (212)
    • Challenging Puzzles
  • ISRO (6)
    • Placement Assistance
  • Mphasis (1)
    • Placement Assistance
  • Oracle (206)
    • Aptitude Interview Questions
    • Java Interview Questions
    • SQL Interview Questions
  • Sonata (65)
    • Analytical Ability Interview Questions
    • C Interview Questions
  • TCS (396)
    • Aptitude Interview Questions
    • C FAQs
    • COBOL Interview Questions
    • Critical Reasoning Questions
    • Quantitative Aptitude Questions
  • Wipro (217)
    • Analytical Ability Interview Questions
    • Languages Interview Questions
    • Verbal Ability Questions

Interview Questions PDF Files

Accounting Interview Questions PDF
Citrix Interview Questions PDF
Best Questions and Answers From C PDF
Job Interview Questions and Answers PDF
Oracle Apps Technical Interview Questions and Answers PDF
Siebel Interview Questions PDF

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.

Latest News

Tags

AccentureWiproAMDAMDOCAxes-TechnologiesAztec-SystemsBirlaSoftCiscoCognizantDellGEHALInfosysISROTCSSonataAdobeOracleMphasis

Contact Us

Geekinterview.com

  • About US
  • Privacy Policy
  • Terms & Conditions
  • DMCA
  • Contact Us

© Copyright 2014-2025 GeekInterview.com | All Rights Reserved


 

It looks like you are using an AD Blocker!

 

 

Please Turn OFF your ad blocker

- OR -

LOGIN to continue using GeekInterview website.

 

 

 

Disable
Ad Blocker

 

Learn More

Login
GeekInterview

 

Login

Create your
GeekInterview account

 

Signup

Continue Reading after Disabling

 

Refresh