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
The moon is almost directly between the sun and earth
anastassius [24]
That's true for a few days out of a month ... a day or two before and after each New Moon. When it does actually get DIRECTLY between, that's when we get a solar eclipse.
3 0
3 years ago
Read 2 more answers
A data center has recently updated a physical server to host multiple operating systems on a single CPU. The data center can now
Amiraneli [1.4K]

Answer: Virtualization

Explanation: Virtualization is the term that describes about creation of something than its actual version. In computer field , virtualization can happen in the storage devices, server elements,network components , operating systems etc.

The mechanism of virtualization helps in a creating a framework in which the resources is divided into multiple units so that more execution and processing can be done in operating system environment. So, the data center  has used the virtualization trend for the separate web servers

3 0
3 years ago
Computer network reduces the cost. explain the statement with example.​
Crank

Answer:

Justify this statement with an example. Ans: Computer Network reduces expenses of an office because computer on a network share different hardware devices like printers, scanners, hard disk etc. And sharing those hardware devicAes will reduces the expense of an office.

Explanation:

Justify this statement with an example. Ans: Computer Network reduces expenses of an office because computer on a network share different hardware devices like printers, scanners, hard disk etc. And sharing those hardware devicAes will reduces the expense of an office.

3 0
3 years ago
A page height that is larger than the page width is characteristic of portrait orientation true or false?
pogonyaev

Answer:

True

Explanation:

The only 2 orientations existent are portrait and landscape.

Think about it: a landscape has to be wider than taller, to fit the landscape in it. A portrait has to be taller than wider, to fit a person's shoulders and head, as in a real portrait.

4 0
3 years ago
Which of these is NOT a core principle of open source software, based on the Open-­‐Source Initiative’s definitions? (a) The pro
beks73 [17]

The license must allow people to experiment with and redistribute modifications.

Answer: Option B.

<u>Explanation:</u>

In the understanding of the FSF, open-source license criteria center around the accessibility of the source code and the capacity to alter and share it, while free programming licenses centers around the client's opportunity to utilize the program, to adjust it, and to share it.

Flexibility and agility, speed, cost effectiveness, ability to start small, great information security are some of the great properties and characteristics of the open source software.

8 0
3 years ago
Other questions:
  • Why do mosquitoes lay eggs in water​
    14·2 answers
  • In addition to talking to other doctors remotely, telegraphy technology?
    5·1 answer
  • Where would you go to add fractions to a document in adobe indesign
    5·1 answer
  • Whatisthebestlocationapp for my androidphonebesidesgoogle maps?
    9·1 answer
  • Which of the following are good uses of a Microsoft Excel spreadsheet? charts payroll newsletters presentations budgets
    12·1 answer
  • Which type of game controller has a set of controls for each hand?
    6·1 answer
  • Who the heII is apsiganocj
    14·2 answers
  • What is Mark Dean’s main contribution to the development of the computer?
    9·1 answer
  • HELP!!!!!!!! my keyboard keeps acting up every time I press a random key on my keyboard when it stops working it works perfectly
    9·1 answer
  • Table Setting in any occasion can add to the beauty and significance of the event. It may
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!