Problem
Resonant circuits are used to select a signal (e.g., 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, ωo, the bandwidth, B, and the gain at the resonant frequency, k.
![2171_Frequency.jpg](https://secure.tutorsglobe.com/CMSImages/2171_Frequency.jpg)
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.
![2060_Circuits.jpg](https://secure.tutorsglobe.com/CMSImages/2060_Circuits.jpg)
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 ωo, B, and k. The design equations for the parallel resonant circuit are:
R = k, C = 1/BR, and L = 1 / ω02C
Similarly, the design equations for the series resonant circuit are:
R = 1/k, L = R/B, and C = 1 / ω02L
Write a Java program that represents Resonant Circuit as a superclass and represents the Series Resonant Circuit and Parallel Resonant Circuit as subclasses. Give the superclass three private instance variables representing the parameters ωo, B, and k of the resonant frequency response. The superclass should provide public instance methods to get and set each 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 ωo, B, and k) and the circuit (the values of R, C, and L). All classes should provide appropriate constructors. Supply a class that demonstrates that the subclasses all work properly.