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
daser333 [38]
3 years ago
10

There are 12 inches in a foot and 3 feet in a yard. Create a class named InchConversion. Its main() method accepts a value in in

ches from a user at the keyboard, and in turn passes the entered value to two methods. One converts the value from inches to feet, and the other converts the same value from inches to yards. Each method displays the results with appropriate explanation.
Computers and Technology
1 answer:
Dafna1 [17]3 years ago
7 0

Answer:

import java.util.Scanner;

public class InchConversion

{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

   

 System.out.print("Enter inches: ");

 double inches = input.nextDouble();

 

 inchesToFeet(inches);

 inchesToYards(inches);

}

public static void inchesToFeet(double inches){

    double feet = inches / 12;

    System.out.println(inches + " inches = " + feet + " feet");

}

public static void inchesToYards(double inches){

    double yards = inches / 36;

    System.out.println(inches + " inches = " + yards + " yards");

}

}

Explanation:

In the inchesToFeet() method that takes one parameter, inches:

Convert the inches to feet using the conversion rate, divide inches by 12

Print the feet

In the inchesToYards() method that takes one parameter, inches:

Convert the inches to yards using the conversion rate, divide inches by 36

Print the yards

In the main:

Ask the user to enter the inches

Call the inchesToFeet() and inchesToYards() methods passing the inches as parameter for each method

You might be interested in
You are studying for a test tomorrow. Your friends invite you to
lapo4ka [179]

Answer: C

Explanation:

7 0
3 years ago
Here's something random idc
melisa1 [442]

Answer:

ey ey

Explanation:

3 0
3 years ago
Read 2 more answers
The ____ line for any e-mail messages you write should clearly state the intention of the e-mail..
KatRina [158]

The <u>subject </u>line for any e-mail messages you write should clearly state the intention of the e-mail.

Electronic mail (e-mail) is a method of digital communications in which messages are exchanged through the internet. The messages are sent from a sender to one or more receivers.  Depending on user’s perspective, every user uses e-mail differently.  Communicating via e-mail requires e-mail platforms such as G*mail, Ya*hoo! Mail, Hot*mail, and Out*look etc. In the every e-mail, there is a subject line that clearly state the intention of the e-mail.

Subject line is an important element of an e-mail. Through the subject line, the message written in the e-mail is briefly summarized in six to eight words. A clearly written subject line provides the recipient a clear understanding that why the email has been sent. When recipient replies back to the e-mail, the subject line is changed accordingly.

This is the subject line of the e-mail that convince the receiver whether to open and read the e-mail. So, it should be written in the way that gives clear intention of the e-mail. We can say that the subject line of the e-mail is the most significant few words in the whole e-mail to convey the main purpose of the e-mail.

You can learn more about subject line at

brainly.com/question/14572730

#SPJ4

3 0
1 year ago
Hey guys... so my dad reset my history on my laptop, and now when i try to login to discord it says "new login location detected
igor_vitrenko [27]

Answer:

do nothing it will happen itself

8 0
3 years ago
Read 2 more answers
Who wants to join my team that goes against bullying?
weeeeeb [17]
I would be glad to. :D
6 0
3 years ago
Other questions:
  • ​printers, monitors,​ tablets, cpus, and laptops are examples of​ ____________.
    14·1 answer
  • An employee who interacts with customers regarding the nature of their car problems, rather than actually working on the vehicle
    12·2 answers
  • andy accidentally saved a file in the wrong folder. what is the quickest way to move the file? create a new file and save it in
    8·2 answers
  • Give 2 examples of when spreadsheets are used.
    15·1 answer
  • What two programming systems uses numbers and text?
    6·1 answer
  • Making sure that your business has something special and distinct to offer is known as?
    12·1 answer
  • Application software can run without the presence of system software true or false ​
    5·1 answer
  • 41. All the following software are examples of operating systems EXCEPT
    5·1 answer
  • Different the policies and protocols in the industry
    13·1 answer
  • According to behaviorism, instruction should provide necessary stimulus in order for
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!