Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Provide a working java program using the following details : Here is a sample output: Enter the wire gauge: 30 Enter the wire length in

Provide a working java program using the following details :

image text in transcribed

Here is a sample output:

Enter the wire gauge: 30 Enter the wire length in inches: 65

The resistance of a 65 inch piece of 30 gauge copper wire is 0.544 Ohms.

The resistance of a 65 inch piece of 30 gauge aluminum wire is 0.914 Ohms.

Electric wire, like that in the photo, is a cylindrical conductor covered by an insulating material. The resistance of a piece of wire is given by the formula where is the resistivity of the conductor, and L, 4, and d are the length, cross-sectional area, and diameter of the wire. The resistivity of copper is 1.678 x 10-8 m. The wire diameter, d, is commonly specified by the American wire gauge (AWG), which is an integer, n. The diameter of an AWG n wire is given by the formula 36-n d= 0.1279239 mm Write a Java class to compute and print out the resistance of copper and aluminum wire. Use the following class, and you add nstance variables, constructors, and other methods public class WireResistance [ // Takes the write gauge and returns the corresponding wire diameter double computeDiameter (int wireGauge) /! Takes the length and gauge of a piece of copper wire and returns the resistance of that wire double computeCopperWireResistance (double length, int wireGauge) // Takes the length and gauge of a piece of aluminum wire and returns the resistance of that wire. The resistivity // of aluminum is 2.82 x 10-8 m double computeAlumWireResistance (double length, int wireGauge) public static void main (String[] args) Your program should validate user input for the wire gauge and wire length (i.e. prevent computation of zero or negative wire gauge or length) and displays the precision of the output resistance to three decimal

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions