Assignment 3 – Changing Your Picture into a Tri-color Flag

Maximum Points = 50

 

(Due before class on September 26, 2007) The purpose of this lab is to introduce programming using loops in Java to modify pictures. In this lab you will use:

  • the Picture class for holding an image
  • the Pixel class for manipulating the pixels  in the image

 Many nations have flags called tri-colors (http://en.wikipedia.org/wiki/Tricolour) that are comprised of mainly three vertical or horizontal stripes. Some flags like India and Mexico have an image inside the middle stripe. Your program is going to start with an image and make it into a tri-color flag.

Write a Java program that reads in your image and redisplays the image as a tri-color flag where each horizontal third of the image is a different color. Use different methods to adjust each color.

 

Submit your image file before and after the change along with the .java file containing your program.

 

Grades are determined using the following scale:

  • Runs correctly..…………………:___/10
  • Correct output……..……………:___/10
  • Design of output..………………:___/8
  • Design of logic…………………:___/10
  • Standards……………………….:___/7
  • Documentation.………………...:___/5

Grading Rubric  (Word document)