15-07mar13arrays - CS100J 13 March 2006 Arrays. Reading:...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CS100J 13 March 2006 Arrays. Reading: Secs 8.1, 8.2, 8.3. Listen to the following lectures on loops on your Plive CD. They are only 2-3 minutes long, and each has an insightful message. 1. The three lectures on Lesson page 7-6 —read the whole page. 2. The four lectures in Lesson page 7-5. Start reading Secs. 8,1, 8.2, and 8.3 on arrays. Computational simplicity If you are writing too much code —it gets longer and longer, with no end in sight: stop and look for a better way . If your code is getting convoluted and you have trouble understanding it: stop and look for a better way . Learn to keep things simple, to solve problems in simple ways. This sometimes requires a different way of thinking. We are trying to teach not just Java but how to think about problem solving. A key point is to break a problem up into several pieces and do each piece in isolation, without thinking about the rest of them. Our methdology for developing a loop does just that.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Arrays An array: an object that can hold a fixed number of values of the same type. Array to the right contains 4 int values. 5 7 4 -2 a0 A declaration has the basic form < type > < variable-name > ; A declaration of x looks as to the right. The declaration does not create the array, it only declares x. x’s initial value is
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/03/2012 for the course CS 100J taught by Professor Davidgries during the Spring '07 term at Cornell University (Engineering School).

Page1 / 10

15-07mar13arrays - CS100J 13 March 2006 Arrays. Reading:...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online