New User? Sign Up
 
Walkins
Hot Jobs
Career Astrology
Placement Papers
Technical Interview
Puzzles
Interview/Resume Tips
Source Codes
Soft Skills
Company Profiles
Job Search
Competitive Exams
 
 
 
 
 
 
 
 
 

Sapient

Part A: spend 40 min here

We are developing a website for a plane Reservation, once the user enters the from and

To Destination and the Date. The web site should display all the planes on that day in a

list of 10 planes at a time. The details are given by a node []

Each node gives following details


Node []

Flight Name ()

Flight Time ()

FromToDestination ()

isDirect ()

isStartOver ()

Flight Rate ()


Assume all the data are in arrays, the following conditions as to be followed while displaying

the list of flights

1. the flights should be displayed in the ascending order of rate

2. If price are equal then it should display direct flight first

3. If there are more than one flight with same rate and they are direct then the flight which

starts early will take the priority

4. If there are more flight at the same time than the one with ascending order of Organization

will take priority

5. I forgot one more condition


Write the method for all the process, no need to write exact code write all the methods and

business application


PartB: spend 20 min here (its very easy)


This is an application which converts an English language to piniac language which is

understood by small kids The software program is written and executed ,the program as to

add 'ay' to all the words starting with vowel at the end, if the word is starting with consents

peal the first letter and add at the end along with'ay'


The actual output

Erehay isay aay ayway ofay onvertingcay englishay toay iniacpay


Output of our software

Erehay isway away ayway ofway onvertingcay englishway toay iniacpay



Assume all the methods are ready and working don't change the logic or add additional

characteristic


Write the comments for the following code, and check for errors and bugs, we are

looking for your error correcting skills and code knowledge


Class piniac

{


is Vowel(char first)


{I'm not able to recall the exact code but its very easy with simple

methods}


addletter (first,' a');

addletter (first.'y');

addletter (first,'\0');

}


addletter (char first [],)

{

Question 1:
There is a company who has a number of employees. Every employee except the CEO can report to only one boss.
The class structure is given as
Employee :
:name,salary,isBoss
methods:getName,getSalary

Each employees cost to the company is the employees salary and if he is a boss the the sum of salarys of the employee and his subordinates

Expected deliverables were:
1.The class structure and
2.Method Float CostToTheCompany(String name)
which returns the cost to the company for the employee whos name is passed
suppose abhishek thakur is passed then the cost to the company will be Abhishek thakur's salary and sum of subordinates salaries working under Abhishek thakur.


question 2:
write a method that generates all four letter combinations like ABCD, ABGK, DHKO. Where four letters are in ascending order .wrong combinations are BADC, PMOA etc.

NEXT