Question: public class Inches ToFeet { public static void main(String[] args) { convert(); // convert feet to inches and output } // This method generates a
![public class Inches ToFeet { public static void main(String[] args) {](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2f1a5ada12_60566f2f1a52b014.jpg)
public class Inches ToFeet { public static void main(String[] args) { convert(); // convert feet to inches and output } // This method generates a random number of total inches. // It then converts to feet and inches and outputs the answer. public static void convert() { // randomly picks a number between 1-200 int totallnches = (int)(Math.random()*200 + 1); Il Convert to feet and inches. Il ex. if totallnches is 38, the output would be: 38 inches is 3 feet, and 2 inches // ADD CODE HERE TO COMPUTE AND OUTPUT THE CONVERTED FEET AND INCHES AS SHOWN BELOW } } Name your file Inches ToFeet.java Complete the method to compute and output the converted feet and inches as shown below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
