Resonant circuits are used to select a signal (e.gr, a radio station or 'TV
channel) from among other competing signals. Resonant circuits are
characterized by the frequency response shown in the figure below. The
resonant frequency response is completely described by three parameters: the
resonant frequency, \(\omega_{\mathrm{o}}\) the bandwidth, \(B\), and the gain at
the resonant frequency, \(k\).
Two simple resonant circuits are shown in the figure below, The circuit in (a)
is called a parallel resonant circuit. The circuit in (b) is called a series
resonant circuit. Both resonant circuits consist of a resistor having
resistance \(R\), a capacitor having capacitance \(C\), and an inductor having
inductance \(L\).
These circuits are designed by determining values of \(R, C\), and \(L\) that
cause the resonant frequency response to be described by specified values of
\(m_{o}, B\), and \(k\). The design equations for the parallel resonant circuit
are:
$$
R=k, \quad C=\frac{1}{B R}, \text { and } \quad L=\frac{1}{\omega_{0}^{2} C}
$$
Similarly, the design equations for the series resonant circuit are:
$$
R=\frac{1}{k}, L=\frac{R}{B}, \text { and } C=\frac{1}{\omega_{\mathrm{o}}^{2}
L}
$$
Write a Python program that represents ResonantCircuit as a superclass and
represents the SeriesResonantCircuit and FarallelResonantCircuit as
subclasses. Give the superclass thrce instance variables representing the
parameters \(\omega_{\mathrm{o}}, B\), and \(k\) of the resonant frequency
response. The superclass should provide public methods to get and set cach of
these variables. The superclass should also provide a display method that
prints a description of the resonant frequency response.
Each subclass should provide a method that designs the corresponding resonant
circuit. The subclasses should also override the display method of the
superclass to print descriptions of both the frequency response (the values of
\(\omega_{\mathrm{o}} B\), and \(k\) ) and the circuit (the values of \(R, C\), and
\(L\) ).
All classes should provide appropriate constructors.
Supply a program that demonstrates that the subclasses all work properly.