Presentation is loading. Please wait.

Presentation is loading. Please wait.

You ARE NOT ALLOWED To Copy Files!!!. You ARE NOT ALLOWED To Be Told What to Write in the Program.

Similar presentations


Presentation on theme: "You ARE NOT ALLOWED To Copy Files!!!. You ARE NOT ALLOWED To Be Told What to Write in the Program."— Presentation transcript:

1 You ARE NOT ALLOWED To Copy Files!!!

2 You ARE NOT ALLOWED To Be Told What to Write in the Program

3 What IS Allowed? Discussion is allowed, even encouraged – the result of it should be captured in your brains (NOT on paper, nor electronic) You can talk as much as you want and at any level of detail about a problem, but you are not allowed to take any written material from each other You are required to report with whom you have discussed the brain draining insurmountable problem (“discussed”, not just fixed a misspelled variable)

4 You are required to report with whom you have discussed the program List people with whom you’ve discussed the program in a comment at the beginning of the program

5 IF SOMEONE COPIES FROM YOU, BOTH OF YOU ARE RESPONSIBLE!

6 Example – Bank Accounts Bank accounts have a state — attributes, like owner, balance, kind of account Bank accounts (in OOP) can do things — methods, like deposit( ) and withdraw( ) Each bank account is represented by an object Send an object a message to get it to add or subtract money Attributes: owner = John Doe balance = $142.30 kind = Checking Methods: deposit( ) withdraw( ) Attributes: owner = John Doe balance = $142.30 kind = Checking Methods: deposit( ) withdraw( ) Attributes: owner = Frank Oz balance = $2301.47 kind = Savings Methods: deposit( ) withdraw( ) Attributes: owner = Frank Oz balance = $2301.47 kind = Savings Methods: deposit( ) withdraw( ) Attributes: owner = alice Budd balance = $29.88 kind = Checking Methods: deposit( ) withdraw( ) Attributes: owner = alice Budd balance = $29.88 kind = Checking Methods: deposit( ) withdraw( )

7 World Details Avenues run north/south  Helpful reminder that Avenues run north/south is that the top of the A points north and the bottom of the v points south. Streets run east/west  Your mental note is that you have a mental note on the direction of avenues

8 Constructor Details Details of the constructor Robot alice = new Robot(6, 2, East, 1);  Robot is what class Object is being created  alice is the reference to this new Object  new Robot(…..) actually makes a new Object  6 the street  2 the Avenue  East the Direction  1 How many Beepers I do not know why it is up and then over, instead of using Cartesian (x, y) order

9 Robot alice = new Robot(6, 2, East, 1); 123 1 2 3 4 5 6 7 8 1 Beeper in the Beeper Bag alice move turnLeft pickBeeper putBeeper turnOff move turnLeft pickBeeper putBeeper turnOff alice street = 6 avenue = 2 direction = East num-beepers = 1

10 Program Development Edit program Compile program Execute program Evaluate results

11 Program Development Edit program Compile program Execute program Evaluate results Lexical and Syntactic errors Execution errors Intent errors


Download ppt "You ARE NOT ALLOWED To Copy Files!!!. You ARE NOT ALLOWED To Be Told What to Write in the Program."

Similar presentations


Ads by Google