My instructions for this are: Use one class to convert a value entered by the user in yards to meters and feet. The program should print the results of each conversion to the screen without the user having to re-enter the value to be converted. The name of the class should be YardsConversion . The program should have the user enter type double value for yards using the keyboard.
The class should contain main method to enter the value in yards to be converted. Also contain two other methods to make the calculations to meters and feet and print the results to DOS screen.
My problem: Is this correct so far? Also, what would need to be done so that I don't have to have the user re-enter the value every single time?
The class should contain main method to enter the value in yards to be converted. Also contain two other methods to make the calculations to meters and feet and print the results to DOS screen.
My problem: Is this correct so far? Also, what would need to be done so that I don't have to have the user re-enter the value every single time?
Code:
import java.util.*;
Public class YardsConversion
{
static double YARDS_TO_METERS = ; /* 1 yd. = meter */
static double YARDS_TO_FEET= ; /* 1 yd. = feet */
Public static void Main(String [] args)
{
Comment