Computer Science 1026A/B Chapter Notes -Computer Language, Mc2 France, Infinite Loop

52 views2 pages
terubarenuka and 39895 others unlocked
COMPSCI 1026A/B Full Course Notes
26
COMPSCI 1026A/B Full Course Notes
Verified Note
26 documents

Document Summary

Recall that we manipulate pictures by manipulating the pixels in the picture. We can change the color value of: Just 1 pixel: some of the pixels in a picture. Pixels in some sub-area of the pixcture: every pixel in the pixel. One way to change a picture is to reduce the amount of red in it: decrease it by half. Get the red value of the current pixel. Change this value to half its original value. Set the red of the current pixel to the new value. Java has a construct that allows us to repeat a series of statements some number of times: called a loop/iteration. A loop should not go on forever, so we need some way to tell them when we are done with the repetition, some. Test to see if the looping should stop. While whatever is inside the while loop is true, repeat what is inside the loop.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents