Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Help!! P9.7 Resonant circuits are used to select a signal (e.g., a radio station or TV channel) from among other competing signals. Resonant circuits

image text in transcribedimage text in transcribedimage text in transcribedJava Help!!

P9.7 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, 0, 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. Inheritance Both resonant circuits consist of a resistor having resistance R, a capacitor having capacitance C, and an inductor having inductance L. Both resonant circuits consist of a resistor having resistance R, a capacitor having capacitance C, and an inductor having inductance L. (a) Parallel (b) Series resonant resonant circuit circuit 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 0,B, and k. The design equations for the parallel resonant circuit are: R=k,C=BR1,andL=o2C1 Similarly, the design equations for the series resonant circuit are: R=k1,L=BR,andC=o2L1 Write a Java program that represents Resonant Circuit as a superclass and represents SeriesResonantCircuit and ParallelResonantCircuit 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 0,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. Tasks: Follow the directions below to complete your lab assignment For today's lab we will be completing Exercise P9.7 from the book. IMPORTANT!! All of your method/class names need to match what is shown in this document. This is the public interface of your class. The classes and methods you need to implement are as follows: Circuit-single method getResistance. Note that this is simply an empty circuit with no resistors, and therefore the resistance is always 0 for objects of this class. This is the parent class. Resistor - subclass of Circuit. Represents a single resistor. Needs to override the getResistance method from the superclass Circuit. To compute the value of the Resistor object you simply return the resistance value. Serial - subclass of Circuit. Contains an ArrayList instance variable. Resistance is computed by the formula given above. Must override inherited getResistance method. Parallel - subclass of Circuit. Contains an ArrayList instance variable. Resistance is computed by the formula given above. Must override inherited getResistance method

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

Step: 3

blur-text-image

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 Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions