Find Jobs
Hire Freelancers

Basic Java

$30-250 SGD

进行中
已发布大约 13 年前

$30-250 SGD

货到付款
Question 1 Restaurant sales tax in Malaysia is 6% and service charge is 10%. Write a program that accepts a price on the command line and prints out the appropriate tax and total purchase price. (4 marks) Question 2 Modify Question 1 program to accept an arbitrary number of prices (THREE prices), total them, calculate the restaurant sales tax, service charge and print the total amount. (4 marks) Question 3 a. Create a menu to prompt user enter their selection (1 for “ Convert Inches to Centimeters”, 2 for “ Convert Centimeters to Inches”, 3 for “Convert Grams to Kilograms”, and 4 for “Convert Kilograms to Grams”) b. If user selects 1, write a program to prompt user enter a number of inches and converts it to centimeters. If user selects 2, write the inverse program that reads a number of centimeters from user and converts it to inches. c. If user selects 3, write a program to prompt user enter a number of grams and converts it to Kilograms. If user selects 4, write the inverse program that reads a number of Kilograms from user and converts it to grams. Note: You are required to identify the formulas. (12 marks) Question 4 Write a program that asks for the user's name and then writes her / his name to the screen with either "Ms." or "Mr." in front, depending if the name is for a female or male. Assume that the only female names are: • Mary • Jessica • Monica Assume that the only male names are: • Peter • Wilson • Johnson (10 marks) Question 5 During a special sale at a store, a 10% discount is taken on purchases over RM10.00. Write a program that asks for the amount of purchases, and then calculates the discounted price. (5 marks) Question 6 IKEA Malaysia wants a program to take orders from the internet. The program will ask ONE item the user wants, will ask its price, and will ask if the user wants overnight shipping. Regular shipping for items under RM10 is RM2.00; for items RM10 or more shipping is RM3.00. For overnight delivery add RM5.00. Your program should be able calculate the total price. (10 marks) Question 7 The maximum possible efficiency of a steam engine depends on the temperature of the steam in the boiler and the temperature of the outside air: efficiency = 1 - Tair / Tsteam where Tair is the air temperature and Tsteam is the steam temperature. The temperatures are give in degrees above absolute zero. Normal air temperature is about 300oK. Boiling is 373oK. Write a program that asks the user for the air temperature and the steam temperature and print out the maximum possible efficiency of a steam engine. However, if the steam temperature is less than 373oK there is no steam, so the efficiency is zero. (10 marks) Question 8 A microwave oven manufacturer recommends that when heating two items, add 50% to the heating time, and when heating three items double the heating time. Heating more than three items at once is not recommended. Write a program that asks the user for the number of items and the single-item heating time. The program then writes out the recommended heating time. (10 marks) Question 9 The front tires of a car should both have the same pressure. Also, the rear tires of a car should both have the same pressure (but not necessarily the same pressure as the front tires.) Write a program that prompt user enter pressure of the four tires and print a message to show whether the inflation is OK or not. (7 marks) Question 10 Although the pressures are the same in the tires, but the pressures must also within the range between 35 and 45. Modify the program in Question 9 and allow the system checks each tire’s pressure. If any of the tires is out of range, the program must able to print out an error message immediately. (8 marks) Question 11 A vendor company will give some discounts on it products based on the total units bought by the customer and the price of each unit. The table below shows the discount given with the price and the total units: Number of the Price (RM) items bought 0.01 – 10.00 10.01 – 100.00 100.01 1 - 9 0% 2% 5% 10 - 99 5 % 7% 9% 100 - 499 9% 15% 21% 500 – 999 14% 23% 32% More than 1000 21% 32% 43% Write a Java program to solve the above problem and display the price after the discount. (20 marks)
项目 ID: 960360

关于此项目

4提案
远程项目
活跃13 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
4威客以平均价$65 SGD来参与此工作竞价
用户头像
Please see pmb, thanks.
$30 SGD 在1天之内
5.0 (43条评论)
4.7
4.7
用户头像
Hy please check PM
$100 SGD 在1天之内
4.8 (14条评论)
4.6
4.6
用户头像
ready to start. choice me as a winner and we will happy together.
$100 SGD 在2天之内
5.0 (1条评论)
0.9
0.9
用户头像
interested
$30 SGD 在2天之内
0.0 (0条评论)
0.0
0.0

关于客户

MALAYSIA的国旗
klang, Malaysia
0.0
0
会员自2月 23, 2011起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。