In a Lebanese store, the seller will let you choose between 2 payment options. Option 1:...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Answer rating: 100% (QA)
import javautilScanner public class Main public static void mainString args int totalchnewdollar... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
What is the test statistic for this test as applied to the data in Table 9.18? Cardiovascular Disease Left ventricular mass (LVM) is an important risk factor for subsequent cardiovascular disease. A...
-
What is the unit cost for this job, beginning balance 18800, direct materials 30600, direct labor 24500 manufacturing overhead applied 41700, adjustment for overapplied overhead 1600 total number of...
-
What is the steady-state vector for this information? The probability that daughters of a mother who attends church regularly will also attend church regularly is 0.8, whereas the probability that...
-
In the financial market, what causes a movement along the demand curve? What causes a shift in the demand curve?
-
The lure of spices during the medieval period wasnt driven merely by the desire to improve the taste of food (Europe produced saffron, thyme, bay leaves, oregano, and other spices for that). The lure...
-
You are trying to push your stalled car. Although you apply a horizontal force of 400 N to the car, it doesn't budge, and neither do you. Which force(s) must also have a magnitude of 400 N? (a) The...
-
Of the three types of neurons (sensory neurons, motor neurons, and interneurons), which type goes to your biceps muscle and tells you to bend your elbow? Which type tells you whether your feet feel...
-
Disco Industries, Inc., manufactures discs for several of the leading recording studios in the United States and Europe. Department 60 is responsible for pressing each disc. Department 61 then...
-
In 2023, Staged Home Ltd. completed the following transactions involving delivery trucks: July S Traded in an old truck and paid $31,600 in cash for furniture. The accounting records on July 5 showed...
-
The Norwegian charity organization CARE campaigns for women's rights. They released a short film reflecting the impact of men's violence against women and the danger that both girls and women live in...
-
Find the volume of a parallelepiped if four of its eight vertices are A(0,0,0), B(1,5,0), C(0, 4,5), and D(5, 4,6). The volume of the parallelepiped with the given vertices A, B, C and D is...
-
Goodyear is thinking of divesting one of the plants. The plant will generate free cash flows (FCF) of $3.8 million at the end of the first year and the cash flows will grow at 3% (assume this growth...
-
Should Carla focus on her hit series or cede control and start the next new thing? explain.
-
Why is new jersey called the garden state and what do they grow?
-
What is the objective of the Control System Design?
-
https://academic.oup.com/jcr/article/36/3/478/1847025 I need a summary of this article i put above.
-
Question 12 Not yet answered Marked out of 4.00 Flag question The current yield to maturity on a government bond is 6 percent and the premium on the market portfolio is also 6 percent. An investment...
-
Presented below are income statements prepared on a LIFO and FIFO basis for Kenseth Company, which started operations on January 1, 2024. The company presently uses the LIFO method of pricing its...
-
A stock price is currently $40. It is known that at the end of three months it will be either $45 or $35. The risk-free rate of interest with quarterly compounding is 8% per annum. Calculate the...
-
A call option on a non-dividend-paying stock has a market price of $2.50. The stock price is $15, the exercise price is $13, the time to maturity is three months, and the risk-free interest rate is...
-
A total return index tracks the return, including dividends, on a certain portfolio. Explain how you would value (a) forward contracts and (b) European options on the index.
-
The Sun contains what percentage of the solar systems mass? (a) about 35% (b) 85% (c) the percentage varies over time (d) over 99%
-
The nebular theory is based on the observation that the solar system (a) follows patterns indicating that it formed progressively from physical processes. (b) has a structure much like an atom. (c)...
-
Each second, the burning Suns mass (a) increases. (b) remains unchanged. (c) decreases.
Study smarter with the SolutionInn App