Sapient  Placement Paper   Candidate Experiences   KIET Ghaziabad-3 Apr 2007

#### Sapient  Placement Paper   Candidate Experiences   KIET Ghaziabad-3 Apr 2007

• Posted by  FreshersWorld
7 Jan, 2012

SAPIENT PAPER ON 3rd APRIL AT GHAZIABAD

INSTRUCTIONS:::
1)Duration of this exercise is 60 minutes.
2) Add appropriates comment to ur code.
3) Focus on the getting logic right and demonstrate the problem comprehension/Analysis.
4) Make any necessary assumption and clearly state the assumption made.

Problem:::
Consider a domestic Airport which has two runways. A flight takes 10 minutes to land .Assume the flight  is ready to land.Each runway can be used by only one aircraft at any given time.The landing flight  run on the free runway.If more than one flight needs to land then available runways then check the fuel reservers at both the flight are  more than 10000 gallons then the flight longest time waiting get the preference & if the fuel reserve is less than 10000 gallons than the flight having lesser fuel resreve get the preference .
Assume that 1000 gallons of fuel is consumed every 10 minutes the aircraft waits for landing.

in case when two or more  flights have same privilages then the flight privilage will be decided by the flight no.
Assume the Data structure

FLIGHT ATTRIBUTE::
{
waiting_time(numeric in minutes);
flight_no(numeric);
reserve _fuel(numeric in gallons);
}
RUNWAY ATTRIBUTE::
{
runway_no(numeric);
isfree(boolean);
reserve_since(date\time);
}

* Create classes and Structures.
* Make the function
public void controlLanding(flight waitingflight[ ],runway freerunway[ ] )

there was only one program in one hr...

ok guys best of luck...
Indra B Singh