Introduction to Object Oriented Programming
Upcoming SlideShare
Loading in...5
×
 

Introduction to Object Oriented Programming

on

  • 338 views

 

Statistics

Views

Total Views
338
Views on SlideShare
151
Embed Views
187

Actions

Likes
0
Downloads
33
Comments
0

11 Embeds 187

http://aragornyeh.blogspot.tw 159
http://aragornyeh.blogspot.com 13
http://efesto.cloudapp.net 3
http://aragornyeh.blogspot.co.uk 3
http://aragornyeh.blogspot.kr 2
http://aragornyeh.blogspot.in 2
http://aragornyeh.blogspot.fr 1
http://aragornyeh.blogspot.de 1
http://aragornyeh.blogspot.com.au 1
http://aragornyeh.blogspot.it 1
http://semicounterarch9.rssing.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Introduction to Object Oriented Programming Introduction to Object Oriented Programming Presentation Transcript

  • aragornyeh.blogspot.com
  • Textbook
  • IE Lab
  • Overview
  • Computer world is just “0” and “1”
  • Computers store All information digitally
  • Digital Information numbers text image audio video
  • Representing Text Digitally For example, every character is stored as a number, H i , H e a t h e r . 72 105 44 32 72 101 97 116 104 101 114 46
  • Binary Number System Represents numeric values using 0 and 1.
  • Binary Number
  • Bit 1 bit 0 1 2 bits 00 01 10 11 3 bits 000 001 010 011 100 101 110 111 4 bits 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
  • C Programming Language • Computing Numbers • Handling Text
  • Computer Program Past Today
  • Objective-C Language Image Audio Video Multimedia 3D Object User Interface
  • INTRODUCTION
  • INTRODUCTION TO OBJECT-ORIENTATION
  • O O P ?
  • Object Oriented Programming
  • P r o c e d u r a l Programming
  • 1. a particular course of action intended to achieve a results 2. a process or series of acts 3. a set sequence of steps, part of larger computer program procedure
  • Step by Step
  • Procedural Flow Chart
  • Example:
  • Procedural Programming
  • Object Basic
  • Object Something that can be seen or touched A thing, person, or matter to which thought or action is directed
  • Object in Computer Programming
  • The process of formulating general concepts by extracting of the essential properties while ignoring the inessential details. Abstraction
  • Object Examples
  • 5 Minutes
  • CLASS AND OBJECT
  • Class and Objects
  • Class and Object
  • Class and Object
  • The genetic characters transmitted from parent to offspring, taken collectively. Inheritance
  • 5Characters
  • behavioral
  • Superclass and Subclass
  • Class Inheritance Benz SL Class
  • Class Inheritance Hierarchy
  • CHAPTER 3
  • NSlog = printf = function is a function for printing statements to the console.
  • Example NSLog(@“Hellow, World");
  • Online Compiler
  • EXERCISE 3.1
  • EXERCISE 3.3
  • 2 Object Structure
  • Object
  • Method and Data Method is what the object can do Data is the object’s chracteristics
  • A Student Object
  • A Student Object can do… Methods Class Student { ……Draw Diagram …….Read Books ……..Perform Calcuation ……..Write Report }
  • Method = Function
  • Data: Instance Variables
  • As a process, encapsulation means the act of enclosing one or more items within a container. Encapsulation
  • Capsule
  • Encapsulation The inner data cannot be touched!
  • Access Data by Method
  • PAGE 5-3
  • PAGE 5-7
  • OOP Concept
  • Uses “objects“ together with their interactions to design computer programs. Object Oriented Programming
  • Object Interaction: Message
  • Knowing how to answer one who speaks, To reply to one who sends a message. Object Interactions
  • OOP = Building Blocks Building blocks to design your program!
  • Building Program with Objects
  • Car Program
  • Chess Program
  • Clock Program
  • C o m p u t e r hockey game
  • Hockey Player
  • Hockey Player Actions
  • Hockey Player Characteristics
  • Design a computer hockey game Object: Hockey player Characteristics: Position, height, weight, salary, number of goals… Actions: Pass the puck, shoot, skate forward, skate backward, punch another player, …etc.
  • The process of formulating general concepts by extracting of the essential properties while ignoring the inessential details. Abstraction
  • Abstraction 抽象化(Abstraction)是將資料與程式,以大意來呈現出外觀 和行為,但是隱藏起實際細節。 例如要用電腦程式去模擬「人」的曲棍球遊戲,在描述了人的 動作(射門、移動、攻擊等)符合設計要求後(如可完整表達 「人」在曲棍球運動的動作),其他「人」的細節(軀幹、器 官、細胞活動乃至人際關係)都可以忽略,以集中設計需要的 功能,並減低程式的複雜度。
  • One more thing...
  • the ability to appear in many forms Polymorphism
  • Polymorphism in OOP 多型(Polymorphism),是指物件導向程式執行時,相同的訊 息可能會送給多個不同的類別之物件,而系統可依據物件所屬 類別,引發對應類別的方法,而有不同的行為。
  • abstraction encapsulation inheritance Polymorphism
  • PAGE 6-19
  • PAGE 7-3
  • Procedural Vs. OO
  • Procedural Programming
  • Monarchy
  • Object Oriented Programming
  • Democracy
  • O.O.Programming is Easy! aragornyeh@gmail .com