Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions