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]
2 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]2 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
An algorithm to display multiplication table a number up to 12​
kkurt [141]

Explanation:

Explanation:They are

Explanation:They are 1) start the process

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed 3) For T = 1 to 10

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed 3) For T = 1 to 104) print M = N*T

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed 3) For T = 1 to 104) print M = N*T5) End for

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed 3) For T = 1 to 104) print M = N*T5) End for6) Stop the process

4 0
3 years ago
Which block cipher mode of operating requires that both the message sender and receiver access a counter that computes a new val
ankoles [38]

There is block cipher kind of mode of operation. The block cipher mode of operating requires that both the message sender and receiver  is exchanged is the (CTR) Counter.

<h3>What is the Counter (CTR)?</h3>

This is known to be a common block cipher mode of operation. It often needs that both the message sender and receiver to have a kind of access a counter, that helps to computes a new value whenever a ciphertext block is been exchanged.

The disadvantage of CTR is known to be the fact that it needs a synchronous counter necessary for both the sender and receiver.

Learn more about  block cipher mode from

brainly.com/question/9979590

7 0
2 years ago
Examples of intermediate technology​
Effectus [21]

Example of intermediate technology is the treadle pump, which enables farmers to provide a greater amount of water to their plants more easily compared to watering by bucket, while requiring much less infrastructure than constructing irrigation dams and pipes.

3 0
3 years ago
Read 2 more answers
What is a good practice to remember when adding transitions to a presentation?
storchak [24]

Answer:

A. Use one type of transition throughout.

Explanation:

Edge 2021.

7 0
3 years ago
Read 2 more answers
Assume your computer clock runs at the speed of 2.5 GHz (G=10^9).
azamat

Answer:

a) T=4*10^{-4}μs

b) N=2.5*10^6 cycles

c) 10000 programs.

Explanation:

a) We know that the frequency is the inverse of the period, so:

f=\frac{1}{T}\\\\T=\frac{1}{f}\\T=4*10^{-10}s

1μs is equal to 1*10^{-6}s

so T=4*10^{-4}us

b) If in a second there are 2.5*10^9 cycles:

N=2.5*10^9*(1*10^{-3})=2.5*10^6 cycles

c) we have to make a conversion, we know that a program takes 100*10^(-3) milliseconds, that is, 1*10^(-4) seconds so in 1 second we can execute:

P=\frac{1s}{1*10^{-4}s}=10000

10000 programs.

7 0
3 years ago
Other questions:
  • The code selection above is taken from the Color Sleuth activity you just completed. This selection would count as an abstractio
    12·1 answer
  • Software that instructs the computer how to run applications and controls the display/keyboard is know as the
    8·1 answer
  • Insurance can help you:a. minimize monthly expenses
    6·1 answer
  • Complete the function void update (int *a, int *b), which reads two integers as argument, and sets a with the sum of them, and b
    8·1 answer
  • I need help with writing the code in Python that draws an arrow pointing to the right.
    15·1 answer
  • A Cisco Catalyst switch has been added to support the use of multiple VLANs as part of an enterprise network. The network techni
    5·1 answer
  • Write a python application that allows a user to enter any number of student test scores until the user enters 999. If the score
    14·1 answer
  • On which tab are the print commands in Excel 2016 accessed?
    7·2 answers
  • How many 2/8 pound patties can she make from 7/8 of a pound of hamburger
    10·1 answer
  • the term elastic in ec2 refers to the fact that you can easily increase or decrease the number of servers you run to support an
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!