Sapient Placement paper
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
Output : four hundred and fifty six (correct)
Output : hundred and fourteen thousand.(wrong)
Desired output : fourteen hundred thousand.
output : hundred and two hundred and thirty five 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)