[SOLVED] Code review
Can someone kindly review my code? I submitted it for a job and I was refused further stages of the inerview process:
PROBLEM: SALES TAXES
Basic sales tax is applicable at a rate of 10% on all goods, except books,
food, and medical products that are exempt. Import duty is an additional
sales tax applicable on all imported goods at a rate of 5%, with no
When I purchase items I receive a receipt which lists the name of all the
items and their price (including tax), finishing with the total cost of the
items, and the total amounts of sales taxes paid. The rounding rules for
sales tax are that for a tax rate of n%, a shelf price of p contains
(np/100 rounded up to the nearest 0.05) amount of sales tax.
Write an application that prints out the receipt details for these shopping
1 book at 12.49
1 music CD at 14.99
1 chocolate bar at 0.85
1 imported box of chocolates at 10.00
1 imported bottle of perfume at 47.50
1 imported bottle of perfume at 27.99
1 bottle of perfume at 18.99
1 packet of headache pills at 9.75
1 box of imported chocolates at 11.25
1 book : 12.49
1 music CD: 16.49
1 chocolate bar: 0.85
Sales Taxes: 1.50
1 imported box of chocolates: 10.50
1 imported bottle of perfume: 54.65
Sales Taxes: 7.65
1 imported bottle of perfume: 32.19
1 bottle of perfume: 20.89
1 packet of headache pills: 9.75
1 imported box of chocolates: 11.85
Sales Taxes: 6.70
Kindly go to my live.com url:
All files in the folder are part of the solution. You can remove / modify the package line for your conveniance.
Thank you very much.
P.S: Please let me know of any questions.
I already have a solution at my url location. If anybody can review it and let me know how it looks, and if not to the mark, then why?!!
Last night I just go through your code roughly. Seems to me, just printing some values to the console, and no any major functionality you have workout. Is that right? If so, on what you are looking reviews. :)
In general the whole code.
According to the problem, I need to print out the sales register output according to that shown in the problem. My code does that accurately but unfortunately the code did not receive a favourable response from the job I applied for.
So there may have something not really valued by your customer. :) Fix it and let them know, if they allowed.
The consulting company I applied to did not give an explanation about anything specific in the code but decided against pursuing further stages of the interview process. They said it is based on the code I had submitted.
Did you see something standout in the code that is not upto the standards, especially in the SalesRegister class?
Thanks for your help.
I don't see such things really in your code. But may be they expect something on it. Bad thing I believe is, if they not given any specific details on the project, how they say it's not in standard at all.
maybe they gave the job to someone who wrote better code plus did they say to do it in java.
Thank you so much guys.
They wanted this to be done either in Java or C#.
Besides, this is not a single vacancy. They are a consulting company that hires constantly. It's perplexing to me.
They have a policy not to provide any detail as to the reason for not approving the code but they did let me know the decision was based on the code. Thus they did not say it was not up to the standards.
I got delayed by one day as my laptop broke down and I had to get a new one. I got the permission from them. ..Maybe they did not believe me.
Anyways it feels re-assuring to know that the code is alright.
Thanks again guys. Back to knowledge-seeking in Java.
Seems this is quite strange to me. Without knowing let them what expect from your code directly, seeking something. Different people use there own standard in Java(not only Java actually), other than that I can't see anything going bad in your code.
Thanks. I am still looking for a job though globally. Let me know if you know of any.
What you mean here. I not clear what you expecting with this thread. If you looking a job related to Java, we have separate sub-forums for it.
I get it..it's the Jobs Wanted forum right?? I am sorry I'll do that there.
Your welcome. If you solve the problem please mark it as solved from the Thread Tools menu. Good luck.