Question: Useing Jython Environment for Students (JES), Version 5.0 Write the code in Jython and test your program. Remember to include comments in the code! PSEUDOCODE

Useing Jython Environment for Students (JES), Version 5.0

Write the code in Jython and test your program. Remember to include comments in the code!

PSEUDOCODE

As usual, bold monospace is actual code and italic serif is pseudocode to guide you. Do not forget to add a header comment and inline comments!!

def main( ):

Have the user select a picture file and create a picture from it

Display the picture

Get a number from the user representing the percentage change as a whole number.

(By this I mean they will enter 25 to mean 25%)

Convert the percentage to the decimal equivalent by dividing by 100.0.

(I will refer to this as 'percentage' below)

for px in getPixels( your picture ):

Get the red, green, and blue components of the pixel (in variable px)

Calculate the new green value by multiplying the old one by 1+percentage

Calculate the new red and blue values by multiplying each by 1-percentage

Set the pixel's color bands to these new values you calculated

repaint( pic )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!