ECE 538 Assignment 6

Your submission should follow our general guidelines. Please follow object-oriented principles. Submit executable jar for all problems.

  1. Modify an image processing program (such as ImageShow2) to convert a grayscale image to a binary image, by converting the input image to grayscale (if necessary) and applying a threshold value obtained from a dialog box. The binary image should be either WHITE (true) or BLACK (false). The user should be able to choose WHITE = gray > threshold or WHITE = gray <= threshold. Use your program to generate an output image of white objects on a black background from the image below

  2. Write a Java program that allows you to create, select and move resistors (or other objects) around the screen. See TestDrag2.java for some ideas.
  3. Modify GrowPath.java which captures sequences of GeneralPath objects, e.g. MoveTo - LineTo - LineTo - ... to allow it to construct, read, and write WIRE objects for circuit layout. Wire objects should have the syntax W x1 y1 x2 y2 . . . xn yn
  4. Extend your circuit analysis program to handle multiple current sources, such as the example below, and calculate the node voltages. The LTSpice version of this circuit can be downloaded from test5.zip Your program should use FileChooser to select a netlist file.
    R R1 1 2 100
    R R2 3 4 400
    R R3 2 0 500
    R R4 4 0 200
    I I1 0 1 0.1
    I I2 2 3 0.02
    

  5. Using ideas in RobotTest2.java, write a program to implement and test an object that acts as a Lidar or radar system, calculating and showing the distance to the nearest obstruction as a function of angle (with respect to robot forward direction).
  6. Create a dialog box, similar to that below, that will allow you to create a new resistor object or modify an existing resistor object.

    Write a Java program that includes a MenuBar with File, Edit, and Help menus. The Help menu should contain and About item that displays a information dialog pane describing the program, its author, and date of current version. The Edit menu should allow the user to select a resistor or create a new resistor and use the dialog box to modify its properties. The File menu should contain an Open item that uses FileChooser to open and read a netlist file. Implement a FileNameExtensionFilter so only netlist text files are visible. The File menu should also contain a Save item that allows the user to generate a new circuit file. The save function should not overwrite an existing file unless explicitly allowed by the user. The operations of selecting or creating a resistor from problem 2 should be used in this program

  7. Continue developing your group project, using dialogs and MenuBars as appropriate.


Maintained by John Loomis, last updated 11 March 2020