123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 

engineering

Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

Computer Science / IT
Electronics
Electrical
Mechanical
Chemical
Civil

CAT / MBA

GMAT / Foreign MBA
Latest Jobs

Engineering Jobs / Technical Jobs
Management Jobs

Sitemap
Terms of use


 
   

Job Placement Papers (All Companies)

 
Placement Papers>>

Sapient Placement Paper

 

SAPIENT PAPER –APRIL 2006

 

Instructions:

  1. Write appropriate comments for your code wherever required.
  2. Focus on the approach & demonstrate problem comprehension & logic.
  3. Assume anything required & clearly indicate your assumptions.

 

 

Qs. 1:  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.

 

 

Qs. 2: Generate an ordered sequence of 4 unique alphabets (A-Z), where an ordered sequence is one which is arranged in ascending alphabetic order.

 

Eg. Ordered : ABCD, BCHU, KRXZ

      Unordered : DCBA, BNMA

 

Write a function getOrderedSet() to generate  sets of such 4-alphabet sequences.

 

Note: Don’t write any input functions such as main().

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG