Question: Part B: Use the knowledge gained in part A to implement a series network that has unlimited number of resistors stored in a C++ vector.

Part B:

Use the 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

Input the 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 results.

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().

Please see sample output at the end of this document for suggestions.

Note:

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.

Part B:

Sample 1:

Enter Voltage: 100

Enter Resistance (0 to exit): 100

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: 100 ohms

Voltage: 100 volts

Power: 100 Watts

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!