Question: JAVA - The figure indicates that the output voltage of the circuit must be 15 Volts when the input voltage is 2 Volts. Consequently, the
JAVA - The figure indicates that the output voltage of the circuit must be 15 Volts when the input voltage is 2 Volts. Consequently, the circuit will operate correctly only when the six resistances satisfy the equation:
((R1+R2)*R4*R6)/((R3+R4)*R1*R5) = 7.5
An input file data.txt contains several proposed designs for the circuit. Each line of the file provides the six resistances listed in order. Some of the designs may not be correct. Write a program that reads the input file (the user may use a different file, so dont hard code it in the application, but instead read it as an argument to the application from the command line), copies the good designs to a file named good.txt, and displays the list of bad designs on the console
Sample Run:
C:\PathName> java CircuitApp data.txt Application description goes here (this is a sample, need to provide your own).
Reading filename: data.txt
Saving good designs to good.txt
The following are bad designs:
10 15 10 20 10 10
25 34 15 65 75 5
2 5 12 24 84 34
6 5 15 24 12 42
40 100 10 5 25 30
25 25 25 25 25 25
35 20 10 15 5 20
data.txt
10 15 10 20 10 10
10 75 10 75 10 10
25 34 15 65 75 5
5 37.5 5 37.5 5 5
2 5 12 24 84 34
6 5 15 24 12 42
1 7.5 1 7.5 1 1
40 100 10 5 25 30
2 15 2 15 2 2
25 25 25 25 25 25
35 20 10 15 5 20
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
