07-07feb13stepwiseRefinement - 1 1 CS100J 13 February 2007...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 1 CS100J 13 February 2007 More on Methods. Developing methods. Also: The inside-out rule; and the use of this and super. Read section 2.5 on stepwise refnement Listen to PLive activities 2.5.1 -- 2.5.4! Quotes that relate to speciying a method beore writing it. A verbal contract isn't worth the paper it's written on. What is not on paper has not been said. If you don't know where you are going, any road will take you there. If you fail to plan you are planning to fail. Dont try to solve a problem until you know what the problem is. Prelim Thursday, 22 February 7:30 to 9:00. 2 Inside-out rule Inside-out rule in most programming languages (see p. 83): Code in a construct can reference any of the names declared or deFned in that construct, as well as names that appear in enclosing constructs (unless a name is declared twice, in which case the closer one prevails). ile drawer for class Elephant Elephant a0 name getName() { return name;} Elephant a0 name getName() { return name;} ElephantPop 3 Inside-out rule Inside-out rule in most programming languages (see p. 83): Code in a construct can reference any of the names declared or deFned in that construct, as well as names that appear in enclosing constructs...
View Full Document

Page1 / 2

07-07feb13stepwiseRefinement - 1 1 CS100J 13 February 2007...

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

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