Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A circuit component is a piece of hardware with two terminals. Much like legos, circuit components can be connected to each other to create

     

A circuit component is a piece of hardware with two terminals. Much like legos, circuit components can be connected to each other to create electrical circuits. A multi-meter is an instrument used by technicians and engineers. It is used to measure voltages and currents. A multi-meter has two probes: red and black. When they are connected to the two terminals of a circuit component, it can measure the voltage difference between them, or the current passing from one to the other. A circuit component can be many different things. A simple type of component is a battery. A battery offers a constant (DC) voltage between its terminals. Each battery has a nominal resistance (so that connecting its terminals to each other doesn't burn the battery). A battery is represented visually as follows: 5V, 30 -5V, 100 Specifically, the longer vertical line is the positive terminal. The voltage (measured in Volts) is the voltage of the left terminal with respect to the right terminal. That is why the voltage of the second example above is -5V. Another simple component is a resistor. It is a passive component (i.e. it does not produce any voltage or current) with a fixed resistance, measured in ohms (Q). It is represented visually as follows: 100 A circuit component can be created by combining two circuit components. This can be done in two ways: series and parallel combinations. In a series combination the two components are connected one after the other", as shown below: 10V, 25 100 10V, 250 100 In a parallel combination the two components are connected by connecting their respective matching terminals, as shown below: 100 100 200 200 Using these combinations, one can create more complicated components, such as the one below: BT1 100, BT2 20V, 00 + HE R4 2000 R 100 ww R2 250 ww R3 500 R5 5002 The following DrRacket data definition describes a circuit: ;;A Circuit is one of ;; ;; ;; -- -- Battery Resistor Series Parallel ;; A Battery is a (make-battery String Double Double) (define-struct battery (name voltage nominal-resistance)) ;; A Battery is a (make-battery String Double Double) (define-struct battery (name voltage nominal-resistance)) ;; A Resistor is a (make-resistor String Double) (define-struct resistor (name resistance)) ;; A Series is a (make-series Circuit Circuit) (define-struct series (first second)) ;; A Parallel is a (make-parallel Circuit Circuit) (define-struct parallel (first second)) Draw a class diagram for the classes that represent this data definition. (It is optional to submit your diagram. You can draw this on paper, or in ASCII art as a comment in your submitted file.) Define Java classes that represent the definitions above. Describe (in English, or in a diagram, or in code...) the contents of a circuit that has at least two batteries, two resistors and one way of combining circuits. It should be different from the ones below. Design the data representation of the example you just described. Name your examples class ExamplesCircuits In the ExamplesCircuits class design at least 5 examples of circuit components, including the following: batteryOne: A battery named "B 1", with a voltage of 10V and a nominal resistance of 250. o resistorOne: A resistor named "R_1", with a resistance of 1002. o simpleSeries: A circuit component mimicking the figure above illustrating the series combination. . complexCircuit: A circuit component mimicking the figure above illustrating the complicated circuit. The parallel combinations are built from top to bottom, and series combinations are built from left to right (i.e. the series circuit with batteries BT1 and BT2 is made first. Then a series circuit with R and R5 is made, and is connected in parallel with R, and the resulting circuit in parallel to R2, and so on. Name the different components exactly as in the figures, but replace subscripts with spaces. For example, change BT2 with "BT 2". Design the method countComponents that counts the number of simple components (batteries and resistors) in this component. For example, the number of simple components in the batteryOne and complexCircuit are 1 and 7 respectively. Design the method totalVoltage that computes the voltage between the two terminals of this circuit component. For example, the voltages in batteryOne and complexCircuit are 10 and 30 respectively. If two components are combined in series, then their voltages are added (remembering that the voltage may be negative). In a parallel combination, the voltage is the same as the voltage across any component (combining two different voltages in parallel is a bad idea, and should never be done. For now, we will avoid this by creating valid examples). Design the method totalCurrent that computes the current flowing from the left terminal to the right terminal of this circuit component. The current is defined as the ratio of voltage and resistance. For example, the currents in simpleSeries and complexCircuit circuit are 0.08 and 0.6 respectively. If two resistances R and R2 are combined in series, the total resistance is R +R2. If they are connected in parallel, their resistance is R which is computed using the equation = +1. / R1 1 R2 Design the method reverse Polarity that computes a circuit component identical with this component, but with the voltages reversed.

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

Analytics Data Science And Artificial Intelligence Systems For Decision Support

Authors: Ramesh Sharda, Dursun Delen, Efraim Turban

11th Global Edition

1292341556, 9781292341552

More Books

Students also viewed these Databases questions

Question

Show enthusiasm for the position (but not too much).

Answered: 1 week ago

Question

Why did analytics initiatives fail at such a high rate in the past?

Answered: 1 week ago

Question

Explain the people-machine collaboration in robo advising.

Answered: 1 week ago