Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
An example of what it should look like
image text in transcribed
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

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_2

Step: 3

blur-text-image_3

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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

Produce speeches and presentations

Answered: 1 week ago