由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 谁给一个这道题目的sample code
相关主题
Thoughtworks code assessment, aptitude paper.问个array in place operation的题目
我花了一个小时才调通过这个程序急问一个面试题,不知该如何回答?请高人给个思路!谢谢!
another google interview question:一个EDA的问题
一道微软题请问A家onsite安排在什么时间比较合适。顺便一面面经。
google interview question这题应该是道简单题
一个Google面试题感觉这是一道经典题
一道program challenge的题问一道算法题
问道看到的面试题请教一道面试题
相关话题的讨论汇总
话题: imported话题: sales话题: perfume话题: total话题: bottle
进入JobHunting版参与讨论
1 (共1页)
i***0
发帖数: 8469
1
Please solve this problem in the form of a simple Android application. The
solution will be judged largely on quality of the Java code, not necessarily
the Android user interface. Please submit your codevia email in a zip
file and include your unit tests.
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
exemptions.
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
===
baskets...
INPUT:
Input 1:
1 book at 12.49
1 music CD at 14.99
1 chocolate bar at 0.85
Input 2:
1 imported box of chocolates at 10.00
1 imported bottle of perfume at 47.50
Input 3:
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
OUTPUT:
Output 1:
1 book : 12.49
1 music CD: 16.49
1 chocolate bar: 0.85
Sales Taxes: 1.50
Total: 29.83
Output 2:
1 imported box of chocolates: 10.50
1 imported bottle of perfume: 54.65
Sales Taxes: 7.65
Total: 65.15
Output 3:
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
Total: 74.68
i***0
发帖数: 8469
2
re
1 (共1页)
进入JobHunting版参与讨论
相关主题
请教一道面试题google interview question
F家 一道LIS 的变种一个Google面试题
LeetCode balanced Binary tree 请教一道program challenge的题
F家电话一面问道看到的面试题
Thoughtworks code assessment, aptitude paper.问个array in place operation的题目
我花了一个小时才调通过这个程序急问一个面试题,不知该如何回答?请高人给个思路!谢谢!
another google interview question:一个EDA的问题
一道微软题请问A家onsite安排在什么时间比较合适。顺便一面面经。
相关话题的讨论汇总
话题: imported话题: sales话题: perfume话题: total话题: bottle