ECE 538 Assignment 5

Your submission should follow our general guidelines. Please follow object-oriented principles. Each project should have an executable jar file.

All programs that use netlists should work appropriately with any netlist. For example, projects 2 and 3 should read a project 4 netlist, but ignore the WIRE elements.

  1. Write a Java application that draws a resistor on the screen and uses three buttons to move the resistor left or right and rotate the resistor by 45-degrees. Use your most recent Resistor class.
  2. Write a Java program to read a resistor net description from a file. Each line of the file should describe one resistor (space-delimited tokens) in the form R name node1 node2 value x y angle. where name is a string, node1 and node2 are integers, and the remaining variables are doubles. Your program should run even if some parameters (such as x y angle) are missing.

    Store the resistor data in an ArrayList and print the data to a TextArea. Demonstrate using the netlist file circuit1.txt.

    You should read the netlist from a file specified by JFileChooser (which should open in the current directory).

  3. Modify the previous program so that it uses Jama to construct and solve the nodal analysis matrix equation A v = b for the nodal voltages v. Print the matrices and solution vector to a TextArea. Demonstrate using the netlist file circuit1.txt. Assume a current source of 1 mA flowing into node 1 from node 0 (ground) as shown in the circuit drawing below.

  4. Create a WIRE object that defines the connection (path) between two components (such as resistors). Read wire objects from your netlist file. A suitable example would be
    WIRE x1 y1 x2 y2 x3 y3
    

    Extend program 2 to read a netlist file and draw the corresponding circuit.

    Use your code to draw the circuit above (except for the current source)

  5. Write a program that reads three separate images and displays them equally-spaced horizontally in a JPanel. See Image Processing 1


Maintained by John Loomis, last updated 16 June 2016