[Solved] GUI (3) Java

$25

File Name: GUI_(3)_Java.zip
File Size: 113.04 KB

SKU: [Solved] GUI (3) Java Category: Tag:
5/5 - (1 vote)

Assume the existence of the following Java GUI application. There are two text fields for user input. The first JTextField variable is named res and is used to input a resistance value in ohms. The second JTextField variable named cap is used to input a capacitance value in farads. The resistance value in an integer and the capacitance value is a floating point number. The user clicks a JButton to perform a calculation. One JButton called tc causes the program to calculate and display the RC time constant of the RC circuit, tc = R * C. Another JButton called cutoff causes the program to calculate the cutoff frequency of the RC circuit, cutoff = 1 / (2 * pi * R * C). The result of the selected calculation is displayed in an output text area variable named output. The output string should say something like this: The RC time constant for resistance 1000 and capacitance .000001 is 0.001 seconds. Clicking one of the buttons generates the event which causes the program to do the selected calculation and update the output area. Assume the user interface has already been implemented and the member variables listed above exist. Your job is to write the ButtonHandler inner class which handles the events from the two buttons, does the requested calculation and displays the appropriate result. Make sure that your capacitance values are output with at least six digits after the decimal point, and your results with four digits after the decimal point.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] GUI (3) Java
$25