head first object-oriented analysis and design introduction

12
Head First Object-Oriented Analysis and Design Introduction

Upload: albert-shields

Post on 29-Jan-2016

240 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Head First Object-Oriented Analysis and Design Introduction

Head First Object-Oriented Analysis and Design

Introduction

Page 2: Head First Object-Oriented Analysis and Design Introduction

The longest journey begins with the first step!

And you should have already traveled a few miles from home!

(You should know something about object-oriented programming before starting this course.)

Page 3: Head First Object-Oriented Analysis and Design Introduction

Things you should already know‣ How to program in some O-O language like Java, C++, or Ruby

‣ One can write horrible programs in an O-O language as easily as you can in a procedural language

‣ How to work as part of a team to build a non-trivial software system

‣ Tools used by poor programmers only help them write bad programs faster

Page 4: Head First Object-Oriented Analysis and Design Introduction

Things to do before starting‣ Select your language

‣ Select your development environment

‣ Plan your schedule so you have time each week for course work

‣ Purchase the book (the authors thank you)

Page 5: Head First Object-Oriented Analysis and Design Introduction

An object has…‣ State

‣ Changes over time

‣ Behavior

‣ What the object does in response to messages

‣ Identity

‣ What makes the object unique

Page 6: Head First Object-Oriented Analysis and Design Introduction

State

DaveAge: 32Height: 6’ 2”

BrettAge: 35Height: 5’ 10”

GaryAge: 61Height: 5’ 8”

Page 7: Head First Object-Oriented Analysis and Design Introduction

BehaviorGet the mail.Cook dinner.

Page 8: Head First Object-Oriented Analysis and Design Introduction

Identity

Okay, which one of you wise guys is the real Poppini? I am the

great Poppini!I’m the

great Poppini!

No, I’m the great Poppini.

I am the great Poppini.

De great Poppini at-a your service.

Page 9: Head First Object-Oriented Analysis and Design Introduction

Classes

‣ Define the properties and behavior of objects

‣ Can have behavior and properties that are defined in the class but are independent of the individual objects

Page 10: Head First Object-Oriented Analysis and Design Introduction

InheritanceMom’s eyes

Dad’s smile

Dad’s sports obsession

Mom’s love of ROCK

Page 11: Head First Object-Oriented Analysis and Design Introduction

Polymorphism‣ Different type of objects can respond to the same message

‣ The actual method that executes is not determined until run time

‣ Dynamic (or late) binding

Page 12: Head First Object-Oriented Analysis and Design Introduction

Encapsulation

…Two… Three. And Abracadabra, the rabbit is gone!

Wait. How’d he do that? Where’s the bunny gone?