Question: write java program question 10 ASAP nd Outpul Console input ar CHAPTER 2 fraction You may want to express the percent athe double value o.ocno,


write java program question 10 ASAP
nd Outpul Console input ar CHAPTER 2 fraction You may want to express the percent athe double value o.ocno, 7 Write a program that derermines the change to be dispensed from a soda contains 1/10th of 19% artificial sweetener. Use a named consta disand dors only machine. An item in the machine can cost berween 25 cents and 1 dollar, iwendi increments (25, 30, 35,90, 95, or 100), and the machine accepts only dollar bill to pay for the item. For example, a possible sample dialogue the following Enter price of item from 2s cente to a dollar, in s-cent incrementa) 45 You bought an item tor 45 cents and gave me a dollar Bo your change ia 2 quarters 0 dimes, and l nickels S. Write a program that reads in a line of text and then outputs that line of texe fir in all uppercase letters and then in all lowercase letters. 9. (This is a better version of an exercise from Chapter 1.) Write a program th reads in a line of text and then outputs that line of text with the first occ nhate changed to "love". For example, a possible sample dialogue might be following: Enter a line of text. I hate you. I have rephrased that lne to read: 1 love you You can assume that the word "hate occurs in the input. If the word "hate: occurs more than once in the line, your program should replace only the fiss occurrence of "hate" 10. Write a program that inputs the name, quantity, and price of three items. The name may contain spaces. Output a bill with a tax rate of 6.25%. All prices should be output to two decimal places. The bill should be formatted in columns with 30 characters for the name, 10 characters for the quantity, 10 characters for the price, and 10 characters for the total. Sample input and output are shown as follows: Input name of item 1: lollipops Input quantity of item 1: 10 Input price of item 1: 0.50 Input name of item 2: diet soda
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
