Sapient  Placement Paper   Candidates Experiences   -1 Jan 1900

Sapient  Placement Paper   Candidates Experiences   -1 Jan 1900

  • Posted by  FreshersWorld 
    7 Jan, 2012


    The Test was quite simple .

    Instruction :
    1. You have to write code for the following program.
    2. You can use any language but ( java , c++ preferable)
    3. Do not write any input function or main function.
    4.Please complete feed back form
    5.Make required assumption.
    6.Do write comment where necessary.
    7.Follow flowchart and algorithm if required.

    Program 1.
    there are 67 seats in train . there are only 5 seats in a row and in last row there are only 2 seats.
    One person can reseve only 5 seat at a time.
    If person reserving seat , the care is atken that he may get all in row. if seats are not available in row then the arrangement is so that person group get nearby seats.

    the following class is given
    public class seat
    char name;
    int seat;
    boolean isSeatempty

    1.Draw require class digram and object diagram.
    2.Write function seatallot(int noofperson)
    to allocate seat with seat nuber printed for the each name.

    Program 2.

    The forum is going on and administartor find that some people use abusing or bad lnaguage in he decided that when he uses such language it was replacedc with beap.

    some string is given and it contain word idiot and bla bla ba?.
    you have to replace the word with ###

    the word is listed in some look up table.
    in Max_list_word

    I think u got idea.

    1. draw class digram,and use appropriate data structure.
    2. write function replacestring()

    Paper submitted by  HARSHAD.  

2009-2016 All rights reserved.