Write a program to calculate a temperature provided by the user into a different unit system. The
Question:
Write a program to calculate a temperature provided by the user into a different unit system. The program should ask the user to enter a temperature unit of degrees Fahrenheit. The program should then ask the user to choose a unit system they would like to have the value converted into, using a menu. The menu should display the choices " deg, C, k and deg R, which should be a stored in cell array. The program should display the output in a sentence formatted as shown below. The actual values in the sentence should change appropriately as the user input and menu selection changes.
Enter the temperature (Deg F) : -128 Menu Chose : k
The Equivalent temperature to -129 Deg F is 184 K.
You are to write this program twice, using two different method as indicated below. Note that in neither case may you use conditional statement, even it you know ho to do so.
a. The program should first convert the temperature in degrees Fahrenheit to all three other unit systems ( degrees Celsius, kelvin, degrees Rankine) and store the result in a vector. it should then generate the report.
b. The program should perform ONLY the specified calculation, not all three, then generate the report. Hint: Store the necessary conversion factors in matrix.
Data Structures and Algorithm Analysis in Java
ISBN: 978-0132576277
3rd edition
Authors: Mark A. Weiss