Placement Papers: Sapient Hiring Test

Get top class preparation for competitive exams right from your home: get questions, notes, tests, video lectures and more- for all subjects of your exam.

TEST 1

part 1. They gave a Java Program to convert the numeric to Words, and there was a bug in it. We have to solve it and give the comments. There is no Syntax Error but only the logical error.

The program compiles without errors and runs, but the desired output is not got. For example

Input: 456

Output: Four hundred and fifty six (correct)

Input: 14000

Output: Hundred and fourteen thousand (wrong) .

Desired output: Fourteen hundred thousand.

Input: 235126

output: Hundred and two hundred and thirtyfive thousand hundred and one hundred and twenty six (wrong)

I am not much clear about the question but frame it out (15 minutes) .

part 2. You have to write a program to calculate the sales price of the product for a given conditions. It is very simple (20 minutes) .

part 3. You need to create a class diagram or data model for the given requirements. The requirement is as follows

In a village there are only few families and there were only one newspaper/magazine agent.

there are lot of news paper and magazine available and every month a new magazine or newspaper it introduced.

Every family is getting at least one newspaper or magazine.

Every month at the end the cost is calculated and collected.

Suppose if a family wants to cancel the subscription, they should be able to do it at any day of the month.

The family should be billed only for the days which they got the newspaper or magazine.

The agent plans to buy a computer and proceed. Please create a class diagram or data model which helps him in developing a new software for it. Do not write the code or Flowchart (25 minutes) .

part 4. Please describe in 50 words. Explain a situation in which you helped a person to excel in life in the field which you are more familiar and the person is nil about it (3 minutes) .