13. objects ii

10
From last time… We talked about classes and objects and built a Star and StarManager class Classes have: // 1. name // 2. attributes (variables) // 3. a constructor method (run via ‘new’) // 4. methods (actions)

Upload: joseph-murphy

Post on 03-Jul-2015

37 views

Category:

Education


1 download

TRANSCRIPT

Page 1: 13. Objects II

From last time…• We talked about classes and objects and built a Star and StarManager class!

• Classes have:!! // 1. name

// 2. attributes (variables)

// 3. a constructor method (run via ‘new’)

// 4. methods (actions)

Page 2: 13. Objects II

DevArthttps://devart.withgoogle.com

Page 3: 13. Objects II

Objects II

CAP 3032

Page 4: 13. Objects II

The Object-Oriented Paradigmhttp://www.youtube.com/watch?v=2kjtQnPqq2U

Page 5: 13. Objects II

Matt Weisfeld!Author, The Object-Oriented Thought Process

It can safely be said that the object has been the driving force in the programming industry

for a very long time and will continue to be so for the foreseeable future… today, just about

every major software development methodology is based on objects.

Page 6: 13. Objects II

Mobile OS Primary Dev Language

Android Java

iOS Objective-C

Blackberry OS Java

Windows Phone .NET (C#, Visual Basic)

These are all object-oriented languages.

Page 7: 13. Objects II

Daniel Shiffman!Learning Processing

“When should I use object-oriented programming?” For me, the answer is always.

Page 8: 13. Objects II

Red, Green, RefactorUsually this applies to test-driven development…!

1. Red: decide what you want to do; your goals!

2. Green: using setup() and draw(), write the code that satisfies your goals!

3. Refactor:!! a. into variables and functions!! b. into objects

Page 9: 13. Objects II

Demo!Night Sky

Page 10: 13. Objects II

For next time…• Reminder: no class on Monday!

• Continue work on Iteration 1!

• Homework 2 due Wednesday!

• Read Shiffman, p. 141–153 (Arrays I)