No. 1 Fresher Jobs Website in India.
Are you employer? Register to Post Jobs Login
Search Jobs

VVCE, Mysore ,11 August 2007 by KPIT

Details of VVCE, Mysore ,11 August 2007 by KPIT conducted by KPIT for job interview.
Share Us With Others
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

Class candidate

{

1st preference

2nd preference

3rd preference

Exam_date

}



Class Avail_seat

{

Seat_avail_in_A

Seat_avail_in_B

Seat_avail_in_C

}



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



Class candidate

{

1st preference

2nd preference

3rd preference

Exam_date



Public :

Int Get_first_preference()

{

(char) Return 1st preference;

}

\

Int Get_second_preference()

Int Get_THIRD_preference()



Date GET_DATE()

{ }

}

Class Avail_seat

{

Seat_avail_in_A

Seat_avail_in_B

Seat_avail_in_C



Public :

void set_seat_A()

{

Seat_avail_in_A = Seat_avail_in_A 1 ;

/* so one seat will reduce from the total seat available in the ecam center A */

}

void set_seat_B()

void set_seat_C()



int get_seat_A()

{

Will return the seat available in the EC- A

}

Int get_seat_B();

Int get_seat_C()



}



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!!

{

char seat_allocated;



public :
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)



Else

Cout