This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ASSIGNMENT 3 Methods, Arrays and the Java Standard Class Library COMP-202A, Fall 2010, All Sections Due: Tuesday, October 26, 2010 (23:55) You MUST do this assignment individually and, unless otherwise specified, you MUST follow all the general instructions and regulations for assignments. Graders have the discretion to deduct up to 10% of the value of this assignment for deviations from the general instructions and regulations. Part 1, Question 1: 0 points Part 1, Question 2: 0 points Part 1, Question 3: 0 points Part 2, Question 1: 30 points Part 2, Question 2: 70 points 100 points total Background The programming portion of this assignment consists of implementing several simple image manipulations. We provide you with the framework to do so in a3-transform.jar . The extension jar stands for Java archive , which is a way to aggregate many files into one. The file a3-transform.jar aggregates several class files that implement image input/output, a text-based user interface and a few image transformations. Your task is to extend the implementation in a3-transform.jar with more image transformations by adding code to the file Transformations.java . The overall program takes an image file as input and produces a new image file ( out.jpg ) as output. When compiling or running your program, you need to specify that a3-transform.jar should be on the Classpath . To do so, follow the steps below: 1. Place the file a3-transform.jar in the same directory as Transformations.java . 2. Open the command-line interface (Command Prompt under Windows, Terminal under Mac OS X, Linux, or other Unix-like operating systems) and navigate normally to the directory / folder containing your files. 3. To compile your work under Windows, issue the following command: javac -cp a3-transform.jar;. Transformations.java To compile your work under Mac OS X, Linux, or another Unix-like operating system, issue the following command: javac -cp a3-transform.jar:. Transformations.java The only difference between the Windows and Unix versions of the above command is that in the Windows version, a semi-colon ( ; ) separates a3-transform.jar from the dot ( . ) that follows; in the Unix version, a colon ( : ) separates a3-transform.jar from the dot ( . ) that follows. 1 4. To run your program under Windows, issue the following command: java -cp a3-transform.jar;. ImageTransformer -nB someFile.jpg The meaning of-nB is explained in Warm-Up Question 1, below. Essentially, this sequence of characters determines which transformations are applied to the image in someFile.jpg . To run your program under Mac OS X, Linux, or another Unix-like operating system, issue the following command: java -cp a3-transform.jar:. ImageTransformer -nB someFile.jpg Again, the only difference between the Windows and Unix versions of the above command is that in the Windows version, a semi-colon ( ; ) separates a3-transform.jar from the dot ( . ) that follows; in the Unix version, a colon ( : ) separates a3-transform.jara3-transform....
View Full Document
This note was uploaded on 02/22/2011 for the course COMP 202 taught by Professor Verbrugge during the Fall '07 term at McGill.
- Fall '07