MP4: Photoscoop
The Assignment
As always, start this MP by reading R-E-A-D-M-E-F-I-R-S-T.txt, in the MP you checked-out from subversion.
This graded assignment consists of four short programs
- PixelEffects.java: This class should delegate extracting red/green/blue values to the methods inside RGBUtilities.
- Effects.java: A simple if-else method that acts as the glue between the menus and the actual processing methods. Note this method should delegate all of its pixel processing work to methods inside PixelEffects. This method is a large number of if-else statements that connect the menu item to each of the methods inside pixel effects.
- PlayListUtil.java: A set of class methods to manipulate lists.
- RGBUtilities.java: This class holds the methods to convert between individual red, green, blue values, and single integer representation of the color. Each red, green, or blue component can have a value between 0 (dark) and 255 (fully on). That is, each component uses 8 bits of information.
What You Will Learn
- Programming Skills:
- Reverse engineering (reading Java unit test code and figuring out the specification & implementation)
- Java Skills:
- Debug by running unit tests in the debugger to find the infinite loop.
- Use bit operators (shift, bitwise-and) to extract red, green, blue values from a rgb value.
- Use 2D arrays to manipulate RGB images.
- Use static methods (including arguments and return values).
- Use loops and expressions.
- Use hexadecimal literals.
- Use string instance methods length, charAt, concatenation.
- Use integer arithmetic (characters as integers, modulus).
- Programming Skills & Domain Knowledge:
- Process picture data # Extend a complete Graphical User Interface application.
- Use the RGB color model.
- Debug existing code.
- Add new functionality to existing codebase that includes several files.
- Work with a larger codebase where some sections are not relevant to the problem in hand.
- Use procedural abstraction and code-reuse to hide implementation details.
What You Should Already Know