ECE 449 Computer Systems Engineering Assignment 4

Your submission should follow our general guidelines. Include a master index.html (in our standard format) that contains or links to all the problems. Use source-highlighting to display your code. Include source-code files and any required images.

Demonstrate the use of executable jar files in the exercises below.

  1. Modify your resistance program from the last assignment to accept a single string from the console (stdin) or from JOptionPane. Use the String.split function to parse an input string such as “1000 2000 2000” into an array of Strings, each representing a single resistance. See Parsing Strings with split for examples.

  2. Write a class to represent a Resistor. Include screen location and orientation (horizontal or vertical) as object properties. Provide and demonstrate a draw(Graphics g) function. Use a JPanel to instantiate several instances of the class at different locations on the panel. Its PaintComponent should call each object's draw function.

  3. Create a Java application and Processing code to animate a colored circle (or more elaborate shape) to resemble a flickering candle. Show an HTML version of your processing and Java code and screen shots. Which program was easier to develope?

  4. Measure the time required for the Arduino to perform various operations, such as integer and double arithmetic and various math functions. Identify those operations that should be performed in one instruction.

Maintained by John Loomis, last updated 10 February 2016