Question: must use this structure in the code struct node { string name; double resistance; double voltage_across; double power_across; }; Use the information or knowledge gained
must use this structure in the code
struct node {
string name;
double resistance;
double voltage_across;
double power_across;
};
Use the information or knowledge gained in part A to implement a series network that has unlimited number of resistors stored in a C++ vector. In general, to solve this problem you will do the following:
Prompt for the input voltage
Group input resistor values and store them in a vector.
Solve for series current
Calculate total circuit power
Calculate the voltage drop across each resistor
Calculate the power dissipated by each resistor.
Display Network
You need to create at least five functions to get credit for part B.
Some/most of the above bullet points could/should become individual functions to solve this problem.
Please test your functions with a variety of inputs in main()..
To determine the series current you will first need to add up all the series resistors (Rtotal). Once you have Rtotal the current simply becomes:
Series Current = Voltage Source / Rtotal
You can use this Current to determine the power dissipation and voltage drops across the individual resistors.
Sample 2:
Enter Voltage: 100
Enter Resistance (0 to exit): 50
Enter Resistance (0 to exit): 50
Enter Resistance (0 to exit): 0
Circuit Parameters:
Total Resistance: 100 ohms
Input Voltage: 100 volts
Series Current: 1 Amp
Total Power: 100 Watts
Node 0 Parameters:
Resistance: 50 ohms
Voltage: 50 volts
Power: 50 Watts
Node 1 Parameters:
Resistance: 50 ohms
Voltage: 50 volts
Power: 50 Watts
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
