Problem Description

Consider the following tuning circuit connected to an antenna, where C is a variable capacitor whose capacitance ranges from Cminmin to Cmaxmax. see image.

The tuning circuit selects the frequency f = 2π / √LC. To design this circuit for a given frequency, take c = √CminCmax and calculate the required inductance L from f and C. Now the circuit can be tuned to any frequency in the range fmin = 2π / √LCmax to fmax = 2π / √LCmin.

Write a Java program to design a tuning circuit for a given frequency, using a variable capacitor with given values for Cmin and Cmax. (A typical input is f = 16.7 MHz, Cmin = 14 pF, and Cmax = 365 pF.) The program should read in f (in Hz), Cmin and Cmax (in F), and print the required inductance value and the range of frequencies to which the circuit can be tuned by varying the capacitance.

Part 1: Problem-Solving Phase

Using the Design Recipe, write each of the following for this problem:

1.Contract
2.Purpose Statement
3.Examples, making sure to include counter-examples
4.Algorithm

Make sure to test your algorithm by hand (see Chapter 2, Section 2.4 in Big Java: Late Objects) with the examples to verify it before continuing to Part 2.

Part 2: Implementation Phase

Using Eclipse, write the Java program for the algorithm formulated in Part 1, and test your program with the examples from Part 1. Make sure to incorporate your Contract, Purpose Statement and Examples as one or more comment blocks, and your Algorithm as line comments in your Java source code.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.