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
A _____ is defined as a malicious program that attacks a computer system directly, rather than infecting a host program, and spr
Bond [772]

Answer:

Virus

Explanation:

7 0
3 years ago
Which method represents a change in data formats? A) Data reusing B) data re-engineering C) Data warehousing D) data mining
jenyasd209 [6]

I believe the answer would be data re-engineering, B, by using the process of elimination. Hope I was able to help!

4 0
3 years ago
How do you get the ios16 update back when you accidentally deleted it?
d1i1m1o1n [39]

Answer:

Explanation:

Sign in to your iCloud account. Tap “Choose backup” and then select the backup you made before in iCloud and tap “Restore”. Then wait for the restoration process to get complete.

4 0
1 year ago
Which windows tool lets you perform automatic backups at regular times (such as on specific days at specific times)?.
arlik [135]

Answer:

Windows Automatic Backup Tool Which Windows tool lets you perform automatic backups at regular times? For regular backups, using third-party automatic file backup program is highly suggested. However, some of you choose to use File History or Windows Backup and Restore (Windows 7).

Explanation:

8 0
2 years ago
If you consider your new colleagues a rich source of information about items that your team had not yet discussed or considered,
stepan [7]

Answer:

False

Explanation:

8 0
4 years ago
Read 2 more answers
Other questions:
  • Due to the shift from host-based networks to microcomputer based networks, more than _____ percent of most organizations' total
    8·1 answer
  • When an attacker attempts to gain access to a user's computer by stealing the encrypted file containing the password hash that w
    5·1 answer
  • Which of the following is NOT a benefit of making digital information and scientific databases openly available across the inter
    12·1 answer
  • 8. How can you prevent your VMs receiving DHCP server messages from unauthorized virtual machine pretending to be DHCP servers?
    6·1 answer
  • A macro enables you to automate repetitive tasks by
    5·1 answer
  • . What is suboptimization?
    6·1 answer
  • What can you use on Code.org's Web Lab to find and fix problems when you are writing code for your website?
    13·1 answer
  • Which access control type would you use to grant permissions based on the sensitivity of the information contained in the object
    11·1 answer
  • Localize the software problem and describe it<br>​
    14·1 answer
  • List five applications field of a computer?​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!