Make a resistor (electronic component) color code solver. You don't need to know much about resistors, just that the numerical resistance value is represented in color bands printed on the resistor.


  • Your engineering solver must have 2 modes:
    • allow you to enter a resistance value and see the proper color bands,
    • change the color bands and see the proper resistance value.
  • For this lab you only need to deal with resistors that have four (4) color bands. Refer to this chart for how to decode the color bands (yes, there are 3, 5 and 6 band resistors and you can implement that option if you want, but its not required, just 4 band resistors is required for this lab).
  • How you display the color bands is up to you. You can use images or you can draw the bands as graphics objects. The resistors on the display don't have to look exactly like real resistors, just close enough so the user gets the idea.
  • Provide a minimum of 3 commands/options: EXIT (BlackBerry/J2ME), ABOUT and HELP. EXIT will exit the program in a platform dependant way, HELP will display some information on how to use the program, and ABOUT will display some basic information about your (name, date, class number, program name, optional email address and website, other information you feel is relevant).


  • Design your application so that it implements one mode that provides the function for both modes at the same time (allow you to enter a resistance value and see the proper color bands AND allows you to change the color bands and see the proper resistance value).
  • Allow the user to switch easily between 3, 4, 5 and 6 bands resistors.
  • Provide an option to indicate if the resistor is in the Standard EIA Decade Resistor Values (E12, E24, E48, E96, E192). See the Resistor color code calculator for details.


The example below shows is simple J2ME MIDP 1.0 display. The < and >keys select the band and the ^ and v keys change the color. The resistor value is shown below that. The select button switches between the resistor and the Target Resistance mode. In that mode the < and > keys select the digit and the ^ and V keys increase or decrease the value. As the digits change the resistor color bands change to reflect the Target Resistance.

What to turn in:

  • Follow the general lab guidelines.
  • Turn in a ZIP file of your entire project.
  • Tell me where you get your images if you uised any (files, sprites, etc).
  • If you had difficulty implementing some features, describe the problems you had and leave in your non-functional code (its better to show that you tried to implement the requirements than to not show any evidence that you tried).