Develop a C++ program for a DC circuit. The circuit has one power supply and two
ID: 1926502 • Letter: D
Question
Develop a C++ program for a DC circuit. The circuit has one power supply and two resistors. The resistors are connected either in series or parallel. You need to design the UML class diagram and its implementation. Design test cases and test the program. You need to prepare a proper project report.This is an individual project.
Sample of run 1 :
Type the name of the circuit:
Series
Type the voltage of the power supply:
20
Type the value of first resistor:
10
Type the value of second resistor:
10
The current in the circuit is : 1
Sample of run 12 :
Type the name of the circuit:
parallel
Type the voltage of the power supply:
20
Type the value of first resistor:
10
Type the value of second resistor:
10
The current in the circuit is : 4
Explanation / Answer
#include #include class series { public : float r1,r2,r,V; void resistance_ser(float r1,float r2) { r = r1+r2; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.