This is the first iteration of my resistance calculator. This version uses JOptionPane for GUI. It can calculate up to 6 bands and outputs the exact value of the resistor including the tolerance.

function

  1. Input how many bands the resistor has.
  2. Input the colors of each band.
  3. Output the value of the resistor.

what i learned

  • How to calculate and read resistors and their value.

resources

notes

I made this program because I wanted to be able to recreate a readily available program online. This ensures that I understand how resistor values are calculated and also gives me a little programming practice. In the future, I would like to use a GUI that doesn’t rely on alert boxes (JOptionPane). I only used JOptionPane because that’s what was taught in class. I’m planning on learning other ways of Java GUI such as containers where it would take input and output on the same window. The next update of the program will incorporate that.

images

Number of Bands Input

Color of Band Input

Resistor Value Output