Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Main Memory Database Systems

Authors: Frans Faerber, Alfons Kemper, Per-Åke Alfons

1st Edition

1680833243, 978-1680833249

More Books

Students also viewed these Databases questions

Question

3. What strategies might you use?

Answered: 1 week ago

Question

3. Is there opportunity to improve current circumstances? How so?

Answered: 1 week ago