Write a program to display a currency conversion table for U.S. Dollar to five other currencies....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program to display a currency conversion table for U.S. Dollar to five other currencies. See the example below. (15 pts) jGRASP exec: java CurrencyConvertTable US Dollar 100.00 || CN Yuan | EURO British Pound Canada Dollar Japanese Yen ||718.00 | 103.00 89.40 138.90 14881.00 150.00 ||1077.00 154.50 134.10 208.35 22321.50 200.00 ||1436.00 206.00 178.80 277.80 29762.00 250.00 ||1795.00 | 257.50 223.50 347.25 37202.50 300.00 ||2154.00 | 350.00 400.00 2513.00 | ||2872.00 | 309.00 | 360.50 268.20 | 416.70 44643.00 312.90 486.15 | 52083.50 412.00 | 357.60 555.60 59524.00 450.00 ||3231.00 | 463.50 402.30 625.05 66964.50 447.00 | 694.50 74405.00 500.00 || 3590.00 | 515.00 Requirements: a) You need two java classes and files for this question. Make sure you save these two java files in the same folder on your computer, so they will be considered as in the same package. b) One java class can be called CurrencyConversion, and thus the java file named CurrencyConversion.java. This should be a container class that contains at least five methods, which convert US dollar to CN Yuan, EURO, British Pound, Canada Dollar and Japanese Yen. You could add more other methods in this class later to convert to more other currencies if you want. No main method is needed in this class. c) Feel free to Google for the latest currency rates. Or you can use the rates below: 1 dollar 7.183 CNY; 1.028 EURO; 0.894 BP; 1.389 CND; or 148.778 JPY If you use different currency rates, the values showing in your table might be slightly different from the example above, which is totally fine!!! d) The second java class can be called CurrencyConvertTable, and thus the java file named CurrencyConvertTable.java. This class has a main method that will invoke (call) the five converting methods from the CurrencyConversion class and print a conversion table. e) Make sure you still display the table in the exact format like the one in the example. • All the numbers should show 2 decimal places. • The numbers in each column should align to the right of the column header. Consider to use \t before and after each column value ||to separate USD column from the rest table, and to separate the other columns in the table. f) Program styles like program top comment block, indentation, alignment, name conventions, etc. are all required. Write a program to display a currency conversion table for U.S. Dollar to five other currencies. See the example below. (15 pts) jGRASP exec: java CurrencyConvertTable US Dollar 100.00 || CN Yuan | EURO British Pound Canada Dollar Japanese Yen ||718.00 | 103.00 89.40 138.90 14881.00 150.00 ||1077.00 154.50 134.10 208.35 22321.50 200.00 ||1436.00 206.00 178.80 277.80 29762.00 250.00 ||1795.00 | 257.50 223.50 347.25 37202.50 300.00 ||2154.00 | 350.00 400.00 2513.00 | ||2872.00 | 309.00 | 360.50 268.20 | 416.70 44643.00 312.90 486.15 | 52083.50 412.00 | 357.60 555.60 59524.00 450.00 ||3231.00 | 463.50 402.30 625.05 66964.50 447.00 | 694.50 74405.00 500.00 || 3590.00 | 515.00 Requirements: a) You need two java classes and files for this question. Make sure you save these two java files in the same folder on your computer, so they will be considered as in the same package. b) One java class can be called CurrencyConversion, and thus the java file named CurrencyConversion.java. This should be a container class that contains at least five methods, which convert US dollar to CN Yuan, EURO, British Pound, Canada Dollar and Japanese Yen. You could add more other methods in this class later to convert to more other currencies if you want. No main method is needed in this class. c) Feel free to Google for the latest currency rates. Or you can use the rates below: 1 dollar 7.183 CNY; 1.028 EURO; 0.894 BP; 1.389 CND; or 148.778 JPY If you use different currency rates, the values showing in your table might be slightly different from the example above, which is totally fine!!! d) The second java class can be called CurrencyConvertTable, and thus the java file named CurrencyConvertTable.java. This class has a main method that will invoke (call) the five converting methods from the CurrencyConversion class and print a conversion table. e) Make sure you still display the table in the exact format like the one in the example. • All the numbers should show 2 decimal places. • The numbers in each column should align to the right of the column header. Consider to use \t before and after each column value ||to separate USD column from the rest table, and to separate the other columns in the table. f) Program styles like program top comment block, indentation, alignment, name conventions, etc. are all required.
Expert Answer:
Answer rating: 100% (QA)
Heres the solution divided into two Java classes as instructed 1 CurrencyConversionjava Contains met... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Use the attached "words.txt" file to store the words along with their ranks in an AVL tree. Then provide the user the option to search for any word. If the word exists the program displays the rank...
-
(10 points) Given that ry + xy = 1. 1. Find a solution of the differential equation that satisfies the initial condition y(1) = 10. Answer: y = 2. Find a solution of the differential equation that...
-
Laval produces lighting fixtures. Budgeted Information for Its two production departments follows. The departments use machine hours (MH) and direct labor hours (DLH). Overhead cost Direct labor...
-
Find the inverse of each of the following matrices: (a) (b) (c) (d) 0.9-0. -0.2 0.7 0.8-0.1 -0.3 0.9 0.7-0.2 -0.2 0.9 0.8-0.2 0.1 O
-
Find M x , M y , and (x,y) for the lamina of uniform density bounded by the graphs of the equations. y = x 2/3 , y = 0, x = 8
-
How does make determine whether a target needs to be rebuilt?
-
Wilco Corporation has the following account balances at December 31, 2012. Share capitalordinary, $5 par value ....$ 510,000 Treasury shares ..............90,000 Retained earnings...
-
Float is defined as the difference between the balance shown on the books and the balance in the bank account. A lag often occurs between the time receipts and disbursements are recorded on the...
-
Each of the following reactions has been reported in the chemical literature. Predict the product in each case, showing stereochemistry where appropriate. (a) CHs CH hea (b) (CH3)2(-C(CH3): T -...
-
Consider a plant that satisfies the following requirements and find the transfer function of the plant. The plant have two poles and one zero. The gain of the plant is two. The maximum overshoot is...
-
Price per TV Quantity Demanded per Month Quantity Supplied per Month $800 2,000 12,000 750 3,000 11,000 700 4,000 10,000 650 5,000 9,000 600 6,000 8,000 550 7,000 7,000 500 8,000 6,000 450 10,000...
-
X Inc. and Y Inc. are virtually identical companies with identical cost structures and very similar business practices operating in the same lines of business. X Inc. is a public company based in...
-
4. If an element in a binary heap is stored in an array at position i and the root is at position 0, a) where is the parent stored? b) where are two children stored?
-
Which banks are currently listed as too big to fail, B) who regulates these banks, and C) what is the name of the supervisory program?
-
What is the size of a small, medium and large company, and their budget size or money allocated to Information Security?
-
Kidney Anatomy - Practice Cortical blood vessels Arcuate blood vessels Interlobar blood vessels 10 1 9. 8. Renal Renal hilum nerve 6. Renal column Capsule 2.
-
A bar of a steel alloy that exhibits the stress-strain behavior shown in Figure 6.22 is subjected to a tensile load; the specimen is 375 mm (14.8 in.) long and has a square cross section 5.5 mm (0.22...
-
Take a backup of your database. Then create a program (using SQL strings) that will insert one record, increase by 10 % the unit price of each item of stock and delete one record with specified stock...
-
Using a text editor or word processor, create a text file holding a series of surnames and payroll numbers (at least five of each). For example: Now write a Java program that uses a while loop to...
-
Modify MediaClient.java so that it creates an ImageIcon from the byte array received from the server and then uses a JLabel to display the image received. Compile the source code for the two program...
-
Whenever Aliza buys a flashlight, she also always buys exactly two batteries along with it. Any more than two batteries will serve no purpose, because she will not be able to use them in the...
-
State governments in India levy a value-added tax on the sale of goods. The rate of this sales tax varies by type of good and by state. In Maharashtra, the general rate of sales tax is \(12.5 \%\),...
-
Divit enjoys watching team sports and considers tickets to kabaddi and badminton games to be perfect substitutes. Show his preference map. What is his utility function?
Study smarter with the SolutionInn App