CSE 3461.03 User Intefaces, Fall Term 2012

Assignment A1 (in groups of 3) - Color chooser for Bar Charts

Changes in red.

Bar charts are a good way to communicate some forms of numerical data in a visual form. Here is an example for a bar chart.

color bar chart

With bar charts in published material it is essential that the chart appears reasonably legible in greyscale printing. As an example, here is how the above chart may appear in print.

greyscale bar chart

The objective of this assignment is to implement a "color picker" GUI application, which enables the user to pick a set of 2 to 10 colors that appear reasonably distinct in greyscale when printed. Note that you do not have to draw bar charts or deal with images, your objective is only to enable the user to pick a set of colors, where each appears reasonably disctinct when printed. More precisely, the user should be able to pick colors individually, not just select from a predefined set [Added Oct 12:] of 10 colors. Colors should also look reasonably distinct on the screen, in terms of hue.

Colors are usually specified in computing systems in triples of red, green, and blue components (RGB), with a range of either [0..1] or [0..255]. Greyscale values feature idential color components, i.e. r = g = b. One of the simplest ways to approximate how a given RGB color looks in greyscale is to compute (r + g + b)/3, and to assign this value to all three channels. Better ways will be discussed in class.

For this assignment, you have to create an application that enables users to solve this problem. The GUI for your application must have a field that enables the user to specify the number of colors to pick (4 for the above bar chart). The rest of the GUI should then be created specifically for that number of colors. In other words, it is not acceptable to give the user always all ten options.

Notes:

  1. Your application should be robust with a good user interface. Make appropriate use of the various GUI components and features supported in JFC/Swing. Consider the organization, presentation, interaction, and over-all usability of your program.
  2. Your source code should be well organised and documented.
  3. You must do this assignment in groups of three.
  4. Do not use the york package or the type package.
  5. Your programs must compile and run in the Prism lab.
  6. The assignments will be awarded letter grades, according to the university's letter grade standard. A program that simply fulfils the requirements described here will be awarded a 'C'. To get a higher grade, we want to see "an excellent job and originality" in your assignment solution.
  7. Name your program 'a1.java'. Submit it on Prism with 'submit 3461 a1 a1.java'. Additional files, if required, may be submitted using the same command, with the filename as the last argument. Use 'man submit' for further details on using the submit command.
  8. Also submit a text file named readme.txt in which you describe the motivation behind your software design. Why did you use the JFC/Swing and HTML components that you did, and why did you organise them that way? Briefly justify your design. If your implementation includes any special features, make sure you describe these and provide appropriate instructions. The length of this description is limited to 400 words.
  9. The readme.txt file should also contain a record of your group meetings. Include the date and time of each meeting, the people present, and the topics discussed. If other forms of communication were used (e.g., e-mail, phone), indicate the type and extent. Also include in your readme.txt file a record of the tasks assigned and performed by each member of the team.
  10. Please make sure the first three lines of the readme.txt are formatted exactly as shown in the template file; namely,
    LoginID, StudentID, LastName, FirstName(s)
    LoginID, StudentID, LastName, FirstName(s)
    LoginID, StudentID, LastName, FirstName(s)
  11. Your application should be designed to work on consumer level systems. This means that you cannot assume that the monitor and/or printer has been calibrated with professional tools (such as color or brightness calibration).