Agenda & Assignment September 28, 2009
CSC 250

Assignments:

Summary of Class Activities:

Sharing the Stick people part 1. Count off around the room to 4 (1,2,3,4) and cluster at four points in the room base on your number. Download each of your stick people into a Processing project and show off the different people. Within your group create a single shell for the stick people. Get them interacting but not doing collision detection in one project. The object of this lesson is to get you thinking about object interaction.

Formal overview of objects in Processing. A "shell" for the stick people - are your people independent objects? Who has what?

Formal overiew of "inner classes."

Elevator part 1: Investigating what we have thus far. In your group review the objects for the elevator problem. Do the mappings methods and data for each object make sense? Do the data types being passed around make sense?

Elevator part 2: Each group will briefly report on their findings while others keeps notes.

Elevator part 3: Summary of design to date within the context of formal object definitions. (Note at this juncture we are not concerned with inheritance. But that will come up. We are concerned with the psuedo code definition of the object:

class SampleObject {

// Datatypes
int [] floors = new int[NumberOfFloors];
// Constructors
SampleObject(int x, int y) { // a comment describes what happens}
SampleObject(int x, int y, float z} {// explain why this one includes z. this also implies that z must have a default value

// Reporter methods
int FindHeight() { /// a coment describes what it does}
Person LeavingElevator(){//yes, an object can be a return type, so can an array}

// Action methods
void AnotherExample(int x, int [] a) {///}

// Drawing/Animation Methods
SEPARATE THESE OUT FROM THE ACTIONS OF THE OBJECT!!!!

1) The shape of the data being passed between objects. There has to be agreement on the shape, e.g. is the data a primitive type or some composite that is represented as another object. (Will you add objects to our list and who is designing the class definitions?) This will also begin to define data that might of necessity be global.

2) Constructors for the class: what parameters will always need to be specified, what might be global?

3) Reporters are methods that provide information to other objects

4) Action methods DO a task for another object

5) Drawing methods render information on the screen -- this is where you all will have to cooperate to decide what the display looks like. Or is this part of the "simulation" responsibility?