Instructions:
My project uses 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 your class should be YardsConversion .The program should have the user enter a type double value for yards using the keyboard.
The class should contain a main method to enter the value in yards to be converted. It should also contain two other methods to make the calculations to meters and feet respectively and then print the results to the DOS screen.
My attempt and questions:
import java.util.*;
public class YardsConversion
{
public static final double yards: ;
public static final double meters: ;
public static final double feet: ;
public static double yards=0
public static double meters=0
public static double feet=0
public static void output()
{
Scanner scannerObject = new Scanner(System. in);
System.out.prin tln("This program allows you to convert a value entered by the
user in yards to meters to feet without the user having to re-enter the value to be converted.");
I don't know if this is the correct way to start or not? I would like to know the command or example of a command to use to execute this. Thanks.
My project uses 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 your class should be YardsConversion .The program should have the user enter a type double value for yards using the keyboard.
The class should contain a main method to enter the value in yards to be converted. It should also contain two other methods to make the calculations to meters and feet respectively and then print the results to the DOS screen.
My attempt and questions:
import java.util.*;
public class YardsConversion
{
public static final double yards: ;
public static final double meters: ;
public static final double feet: ;
public static double yards=0
public static double meters=0
public static double feet=0
public static void output()
{
Scanner scannerObject = new Scanner(System. in);
System.out.prin tln("This program allows you to convert a value entered by the
user in yards to meters to feet without the user having to re-enter the value to be converted.");
I don't know if this is the correct way to start or not? I would like to know the command or example of a command to use to execute this. Thanks.
Comment