Question: In a Lebanese store, the seller will let you choose between 2 payment options. Option 1: to pay your total in Lebanese Lira at

In a Lebanese store, the seller will let you choose between 2 

In a Lebanese store, the seller will let you choose between 2 payment options. Option 1: to pay your total in Lebanese Lira at the dollar rate of 18000. Option 2: to pay part of your total in fresh dollar and the second part in Lebanese Lira with a different rate. Write a program that will ask the user to enter the total in dollar and to choose an option (1 or 2). Java langauge If the user choose 1 the program should display the total amount due in $ and the equivalent in L.L. The amount in L.L can be calculated as follow: Amount in LL = Total * 18000 If the user choose 1, the program should ask the user about how much percentage he will pay in fresh $ and what is the dollar rate for this option. The program should then display the total amount due in fresh $, and the total amount due in L.L. The amount in $ can be calculated as follow: Amount in $ = Total * percentage The amount in L.L can be calculated as follow: Amount in LL = Total * (1 - percentage) * dollar rate Below is a sample run : Sample Run1: Enter the total in $: 1000 Option 1: pay the full amount in L.L. Option 2: pay part in $ and part in L.L. Please choose an option (1 or 2): 1 Your total 1000$ is equivalent to a payment of 18000000.0 L.L. Sample Run2 : Enter the total in $: 1000 Option 1: pay the full amount in L.L. Option 2: pay part in $ and part in L.L. Please choose an option (1 or 2): 2 Enter the percentage of fresh dollar payment: 0.3 Enter the new dollar rate: 15000 Your total due payment is 300.0$ and 10500000.0 L.L Sample Run3: Enter the total in $: 1000 Option 1: pay the full amount in L.L. Option 2: pay part in $ and part in L.L. Please choose an option (1 or 2): 4 Invalid option.

Step by Step Solution

3.47 Rating (170 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javautilScanner public class Main public static void mainString args int totalchnewdollar... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (2 attachments)

PDF file Icon

635f6c6fa1169_231853.pdf

180 KBs PDF File

Word file Icon

635f6c6fa1169_231853.docx

120 KBs Word File

Students Have Also Explored These Related Programming Questions!