DOC PREVIEW
TRINITY CSCI 1311 - Lecture Notes
Pages 5

This preview shows page 1-2 out of 5 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1while Loops9/19/20072Opening Discussion■Let's look at some solutions to the interclass problem.■When is the for loop not ideal? When you can't easily calculate beforehand how many iterations to do.■Using the Java view in Alice.■Do you have any questions about the project?3The while Loop■Last time we saw how we can use a for loop to repeat code a certain number of times. As long as we could calculate the number of times in advance it worked great.■Many times you want something to happen until a certain condition is achieved. For this you use a while loop.■The while loop takes one argument, a boolean expression. The body is executed repeatedly as long as the statement is true.■If the body of the loop can't change the condition you get an infinite loop.■The while loop is a pre-check loop.4Serious Coding■Now that we have a lot more elements to play with, I want us to write something more significant in Alice.■Though it might pain some of you, I want to pull in a little physics here so that we can use a bit more of our math skills in Alice.5Minute Essay■Do you have a good idea of what you want to do for the project?■Interclass Problem – Do one of the following problems: 4.9, 4.10, or


View Full Document

TRINITY CSCI 1311 - Lecture Notes

Course: Csci 1311-
Pages: 5
Documents in this Course
Arrays

Arrays

12 pages

Arrays

Arrays

10 pages

Applets

Applets

5 pages

Arrays

Arrays

8 pages

Methods

Methods

12 pages

Drawing

Drawing

8 pages

Load more
Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?