ECE 538 Assignment 2

You should submit an index.html document summarizing your work and reporting validation tests. You should also submit source files and other files helpful in reconstructing or verifying your work.

  1. Modify the resistance programs from asgn 1 to use JOptionPane. You should use a loop to read resistance values. Each time the prompt should indicate the resistor number (e.g. "Enter resistor 3"). Calculate the serial and parallel resistance and display in a message JOptionPane
  2. Create a class for the object Resistor. Class variables should include the resistor name (String) and value (double). Add a toString function. Write a test program to validate the operation of your class.
  3. Modify your resistance program from the last assignment to accept command line arguments such as R1 1000 R2 500 R3 600 and build an ArrayList of resistor objects. Calculate the equivalent parallel resistance using a simple loop.
  4. Modify to count and display the number of calls to PaintComponent (as well as the JPanel size).

  5. Download and get the source-highlighting program to work. Note: copy the un-zipped files in to your C:\Program Files directory. Keep the same directory structure.

Maintained by John Loomis, last updated 25 May 2016