Your submission should follow our general guidelines. Please follow
object-oriented principles.
Provide executable jar
files for all java programs.
Ideally you should be using MenuBar as a regular program feature.
- Improve your resistor-construction program from the last assignment (prob 6) by
allowing the control-R key to rotate selected resistors and by allowing the user to draw
wires. You may want to have a menu item that switches between resistor mode and wire mode.
See KeyDemo
for an example of processing keystroke events.
- Extend your circuit analysis program to handle multiple voltages
sources, such as the example below, and calculate the unknown node values.
Display your results in a TextArea and use a MenuBar with File options to select
and read the circuit files.
Format your node variables to distinguish voltages from currents. In the example,
there are four nodes and two voltage sources, so the matrix is 6 x 6 and the node voltages
would be:
V(1) = ***
V(2) = ***
V(3) = ***
V(4) = ***
The LTSpice version of this circuit can be downloaded from test6.zip
R R1 1 2 100
R R2 3 4 400
R R3 2 0 500
R R4 4 0 200
V VA 1 0 9
V VB 3 2 5
- Modify your earilier image display programs so that you can use a
growbox
to do the equivalent of
imcrop
in MATLAB. Your program should write out
the cropped image to an output image file.
- Modify Convolve3
to calculate and display a laplacian filtered image. An example Lapacian filter is
shown below:
-1 6 -1
6 -20 6
-1 6 -1
Notes:
- you should modify the output range for bipolar images.
- You should choose an appropriate scaling value.
- Here are some simple test images:
- Demonstrate with other images of your choosing.
- Modify the robot motion test2 program by adding a controller that
allows the user to change the velocity of the robot only by calling the setVelocity method. The controller
should open in a separate JFrame. The goal is to steer the robot around the screen. Provide instructions, if necessary,
to explain how to operate the controller.
- Show the family trees for
JFrame
, JPanel
,
JLabel
, and JButton
.
- The file Projectile.zip contains a mortar simulation in Java.
Modify this program to use Swing components. Also edit the textfields to include
initial or suggested values for the parameters, so that you can press the Fire
button immediately. Warning: The Java application does not close down properly when
run by double-clicking. This behavior is one of the problems you must fix.
Reference
James G. Gotting, Matrix Analysis of Circuits Using MATLAB
Prentice-Hall, 1994. ISBN 0-13-127044-3.
Maintained by John Loomis,
last updated 23 March 2019