Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Programming in Java: Electric wire, like that in the photo, is a cylindrical conductor covered by an insulating material. The resistance of a piece of

Programming in Java:

image text in transcribed

image text in transcribed

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 p is the resistivity of the conductor, and L, A, 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 instance variables, constructors, and other methods public class WireResistance I/ 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) ( II 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 points. Here is a sample output with no description message

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_2

Step: 3

blur-text-image_3

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

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students explore these related Databases questions