Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In pseudocode An example of what it should look like 2. Electrical circuits may be connected in series or in parallel. You can read a
In pseudocode
2. Electrical circuits may be connected in series or in parallel. You can read a general description at https:/www.allaboutcircuits.com/textbook direct-current/chpt-5/what- are-series-and-parallel-circuits!. The first two pictures shown there are Parallel 2 3 4 6 5 In both pictures, R1, R2 and R3 are resistors (electrical components that reduce the amount of current in the circuit to a desired amount), the arrows show the direction in which the current is flowing, and the symbol on the far left, with +and-next to it is a voltage source. A few standard formulas that we can apply to these circuits ane Total resistance in the series circuit above = R1+ R2 + R3 Total resistance in the parallel circuitT Current flowing in the circuit = Voltage / Total resistance Power Voltage x Current Assuming that we are dealing with the two possible circuits shown above, design the logic, in pseudocode, for a program that: a. Allows a user to continuously enter (Q" for the circuit type to stop) i. The type of circuit ("S" for series."P" for parallel) ii The values of the three resistances ii. The voltage b. Contains methods as follows: i.calculateResistance 1. parameters-circuit type, the values of the three resistances 2. calculates and returns the total resistance based on the type of i. calculateCurrent 1. parameters-voltage, total resistance 2. calculates and returns the current iii. calculatePower 1. parameters-voltage, current 2. calculates and returns the power iv. displayResults 1. parameters -total resistance, current, power 2. outputs these three items 3. does not return anything Calls these methods in the correct order to perform all the calculations and output the results c An example of what it should look like
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started