Answered step by step
Verified Expert Solution
Question
1 Approved Answer
!! Write a program that converts yards to the number of feet, as well as the number of inches (eg, there are 10.5 feet in
!! Write a program that converts yards to the number of feet, as well as the number of inches (eg, there are 10.5 feet in 3.5 yards, and there are 126.0 inches in 3.5 yards. Aan we come up with an algorithm using Problem Solving Strategies and implement the programas Contadt Wetes the program and was LIO 2. Modify the program so that it will get the number of yerde in other words, get user input for the number of yerds 0420 The program uses magic numbers, such as the number of foet per yard and the number of inches per foot which makes hard to read, maintain and debug Rx this by modifying the program from port &2a so that it uses named and contar constant vorbesc improve the programs legbility and make easier tomar Lab429 When we run the program from port42b, what output is produced what changes should be made to make the program output more readable Make the required changes to the program from Convertyards.java ConvertYards : number; number, number * program is given a distance measure in yards * progran converts the measure to feet and to inches . Examples: yards feet inches 3.5 10.5 | 126.0 | 0.0 0.0 * 0.0 -3.5 | *** ABORT *** */ public class convertyards public static void main(String[] args) double yards, feet, inches; // get the number of yards yards = 3.5; // calculate the number of feet feet - yards. 3; Il calculate the number of inches inches = feet * 12; // output the measurement as feet and inches System.out.println(yards + "yards are" + feet + "feet"); System.out.println(yards + "yards are" - inches + "inches") } // end main } // end class ConvertYards
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started