Question: 6.10.2: Convert a height into inches. Write a second convert Tolnches with two double parameters, numFeet and numinches, that returns the total number of inches.
6.10.2: Convert a height into inches. Write a second convert Tolnches with two double parameters, numFeet and numinches, that returns the total number of inches. Ex: convertTolnches(4.0, 6.0) returns 54.0 (from 4.0*12+6.0). 1 import java.util.Scanner; po 3 public class FunctionOverloadToInches { 5 Altest passer 7 I public static double convertToInches(double numFeet) { return numFeet. 12.0; } / Your solution goes here */ public static void main (String args) { double totInches; 9 10 tot Inches convertToInches(4.0, 6.0); System.out.println("4.0, 6.0 yields " + tot Inches); tot Inches - convertToInches(5.8): System.out.println("5.8 yields " + tot Inches): Run
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
