SAPIENT PAPER ON 11th AUGUST AT MYSORE
The test was on 11th Aug 2007, in Vidya Vardhaka College of Engineering, Mysore
There was two rounds.
1) Code a problem
2) Tech Interview - this was after a week in Bangalore JSS college
I hope you will find help from this info. sharing!!
Problem(1 hour duration)
There are three ICFAI exam centers, candidate can choose online these exam centers with preference. Ex like:
1st preferernce EC-B
2nd preference EC-A
3rd preference EC-C
There are two classes
Allocate the seat as per 1st preference, if not available, then allocate 2nd preference.
WAP to implement the concept. (You can avoid the main and not important codes).
I coded like this
(char) Return 1st preference;
Seat_avail_in_A = Seat_avail_in_A 1 ;
/* so one seat will reduce from the total seat available in the ecam center A */
Will return the seat available in the EC- A
Other than the above classes, I took one more class, which is
Class alloc_seat : inheritence candidate /* I used inheritance in my program also, so a syntax error!!
void seat_allocated(candidate_list) /* This is the main function they are explicitly asked */
void alloc_seat :: seat_allocated(candidate_list)
/* program flow
if date is the required date
If(Get_first_preference() = A)
If(get_seat > 0)
Set_preference(); /* So the EC-A seat will will be deducted by one;
Seat_allocated = A ;
elseIf(Get_first_preference() = B)
else If(Get_first_preference() = C)
If(seat_allocated == NULL) /* If seat is not selected */
If(Get_second_preference() = A)
If(Get_second_preference() = B)
If(Get_second_preference() = C)
If(seat_allocated == null)
If(Get_third_preference() = A)
If(Get_third_preference() = B)
If(Get_third_preference() = C)