Class 3 - Methods Class 3 1 Goals for Today n n Build world-level methods Build class-level methods MGMT 290D 2 Methods n n n n n Programs consist

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

View Full Document Right Arrow Icon
Methods Class 3 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Goals for Today n Build world-level methods n Build class-level methods MGMT 290D 2
Background image of page 2
Methods n Programs consist of a set of statements n Method: behavior-producing message n Objects have predefined methods for basic tasks n Methods may also be created by Alice developers n Two reasons for building your own methods ¨ To organize your story into more manageable pieces ¨ To provide an object with additional behaviors MGMT 290D 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
World Methods for Scenes and Shots n Scene: segment of a story n Shot: part of a scene from a given camera position n User stories can be divided into scenes and shots ¨ A convenient technique for completing a project n Divide and conquer approach to building user stories ¨ Break a big problem into smaller problems ¨ Solve each of the smaller problems ¨ Combine the smaller problems into a solution MGMT 290D 4
Background image of page 4
Methods for Scenes n Scenario: develop a user story with three scenes n Convention for naming methods ¨ Name should be a verb or verb phrase ¨ Name should describe what the method does n Creating the first new method ¨ Select the world object ¨ Click the create new method in the details area ¨ Enter playScene1 in the New Method dialog box n Check new method by sending say() to ground ¨ First test fails because my_first_method() is empty MGMT 290D 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
Methods for Scenes (continued) MGMT 290D 6
Background image of page 6
Methods for Scenes (continued) MGMT 290D 7
Background image of page 7

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

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

This note was uploaded on 04/04/2012 for the course MGMT 290 taught by Professor Staff during the Fall '08 term at Purdue University-West Lafayette.

Page1 / 24

Class 3 - Methods Class 3 1 Goals for Today n n Build world-level methods Build class-level methods MGMT 290D 2 Methods n n n n n Programs consist

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

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