1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Dominik [7]
3 years ago
10

Write a second convertToInches() with two double parameters, numFeet and numInches, that returns the total number of inches. Ex:

convertToInches(4.0, 6.0) returns 54.0 (from 4.0 * 12 + 6.0).FOR JAVA PLEASEimport java.util.Scanner;public class FunctionOverloadToInches {public static double convertToInches(double numFeet) {return numFeet * 12.0;}/* Your solution goes here */public static void main (String [] args) {double totInches = 0.0;totInches = convertToInches(4.0, 6.0);System.out.println("4.0, 6.0 yields " + totInches);totInches = convertToInches(5.9);System.out.println("5.9 yields " + totInches);return;}}
Computers and Technology
1 answer:
mixer [17]3 years ago
5 0

Answer:

   public static double convertToInches(double numFeet, double numInches){

       return (numFeet*12)+numInches;

   }

Explanation:

This technique of having more than one method/function having the same name but with different parameter list is called method overloading. When the method is called, the compiler differentiates between them by the supplied parameters. The complete program is given below

public class FunctionOverloadToInches {

   public static void main(String[] args) {

       double totInches = 0.0;

       totInches = convertToInches(4.0, 6.0);

       System.out.println("4.0, 6.0 yields " + totInches);

       totInches = convertToInches(5.9);

       System.out.println("5.9 yields " + totInches);

       return;

   }

   public static double convertToInches(double numFeet)

       {

           return numFeet * 12.0;

       }

       /* Your solution goes here */

   public static double convertToInches(double numFeet, double numInches){

       return (numFeet*12)+numInches;

   }

}

You might be interested in
I have no idea, this has two parts. Any help I would love.
lana [24]

Answer:

2that is the question??? then many I could help

7 0
3 years ago
Can someone answer these 2 please
Leto [7]

Answer:

c for the first one and d for the secound one

Explanation:

5 0
3 years ago
How to change the indent of the list item "regular" on slide 2 to .5 inches in powerpoint?
galina1969 [7]
<span>You can change the identation of text in Powerpoint by right clicking on the list item and selecting, "Format Text". On the paragraph tab, you can adjust the indentation before text as given in inches.</span>
4 0
3 years ago
Nicole wants to create a database to collect information about videos in her video rental store. She would like to use the datab
kobusy [5.1K]

Answer:

All the field which she has mention has to created by Nichole in her database.

Explanation:

The following fields have to be created in the database

title, rating, actor, and producer rating, director, and actor title, rating, actor 1, actor 2, actor 2, actor 4, producer, and in the stock product number, price, and rating

 

And additional field also has to create movie-length also as integer field which should carry the length of the movie  

Date of release and movie certificate also can be captured so the search engine will be very useful

3 0
3 years ago
Tab stops are useful when you want to?
Lelu [443]
Indentation and alignment are very noticeable on a printed page, so you will probably want to set the tab stops in your document precisely how you want them.


8 0
3 years ago
Other questions:
  • What keyboard shortcut keys selects cell A1
    12·1 answer
  • Which result would support the particle theory of light?
    6·2 answers
  • An item such as a smart card is an example of the _______ form of authentication.
    10·1 answer
  • Which document would most likely be written in an informal style?
    12·1 answer
  • What is an instruction set architecture​
    7·2 answers
  • What is the foundational domain for business
    12·1 answer
  • You may have come across websites that not only ask you for a username and password, but then ask you to answer pre-selected per
    11·1 answer
  • Hey, Another question. I'm sure it's possible in the future, but I wanted to ask if HIE would be possible. I'm sure it would be,
    12·1 answer
  • Which type of protocol allows for a secure data transmission using encryption methods?
    7·1 answer
  • To manage OpenLDAP policies over Command Line Interface (CLI), a certain type of file is needed. What is this type of file calle
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!