{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Class 3 - Methods Class 3 1 Goals for Today n n Build...

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

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

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

View Full Document Right Arrow Icon
Goals for Today n Build world-level methods n Build class-level methods MGMT 290D 2
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
Image of page 3

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

View Full Document Right 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
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
Image of page 5

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

View Full Document Right Arrow Icon
Methods for Scenes (continued) MGMT 290D 6
Image of page 6
Methods for Scenes (continued) MGMT 290D 7
Image of page 7

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern