There are several cases where we can use conversions from one quantity to another. It can be about temperature, from Celsius to Fahrenheit; imperial units to SI units (such as inches to centimeters, or feet to meters, or miles to kilometers); or currencies (Turkish Liras to Dollars). Consider the following hypothetical scenario where products are displayed in an online store. Of course, everything will be in your Java program. The store should be able to display the product information using the correct units and prices to any visitor in the world. The users can display the products in the store and can add their own. Design and implement the Java version of this scenario. In the main function, create two products from Turkey, using SI units and the price in Turkish Liras, two products from the USA, using imperial units and the price in US Dollars. Finally, display all four items from Germany, using SI units and Euros. You can come up with the conversion rates, they don’t have to be accurate.
There are several cases where we can use conversions from one quantity to another. It can be about temperature, from Celsius to Fahrenheit; imperial units to SI units (such as inches to centimeters, or feet to meters, or miles to kilometers); or currencies (Turkish Liras to Dollars).
Consider the following hypothetical scenario where products are displayed in an online store. Of course, everything will be in your Java program.
The store should be able to display the product information using the correct units and prices to any visitor in the world. The users can display the products in the store and can add their own.
Design and implement the Java version of this scenario. In the main function, create two products from Turkey, using SI units and the price in Turkish Liras, two products from the USA, using imperial units and the price in US Dollars. Finally, display all four items from Germany, using SI units and Euros. You can come up with the conversion rates, they don’t have to be accurate.
Step by step
Solved in 2 steps