Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The resistance in a strand of wire can be computed using: R = 4rho L/pi d^2 where rho is the resistivity of the wire, L
The resistance in a strand of wire can be computed using: R = 4rho L/pi d^2 where rho is the resistivity of the wire, L is the length and d is the diameter. The diameter of wire can be determined given the American wire gauge number: d = 0.127 times 92 36-n/39 where n is the AWG number. Write a program that prompts the user for the AWG number (integer) and the length of a piece of wire (double). Then compute the electrical resistance. You'll need one method to determine the diameter of the wire from the AWG number. Then, pass this diameter and the length you collected from the user another method which computes the resistance value using the above formula. Call the function twice, once for a copper wire (copper has a resistivity (rho) of 1.68 times 10^-8 Ohm/m) and again to compute the resistance in aluminum wire (aluminum has a resistivity (rho) of 2.82 times 10^-8 Ohm/m). Have your program print out the resistance for both. Use constants to define the resistivity of both copper and aluminum. Remember, write a main method to collect the necessary input, to call the other methods and collect their returned values and then to display the output. C:\cosc1046\a3\>java question java question Enter wire gauge: 22 Enter wire length (in m.):10 Diameter of the wire is: 0.6438032984904795 Resistance in copper is: 5.160752189379868E-7 ohms Resistance in aluminum is: 8.662691175030492E-7 ohms
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started