Objective-C: Intro Michelle Alexander COMS E6998 2/4/2013.

Slides:



Advertisements
Similar presentations
Introduction to C++ An object-oriented language Unit - 01.
Advertisements

Objective-C Lecture 2 Memory management Memory management in OC is semi- automatic: The programmer must allocate memory for objects either a) explicitly.
Dynamic Allocation and Linked Lists. Dynamic memory allocation in C C uses the functions malloc() and free() to implement dynamic allocation. malloc is.
1 Lab 4 Westfield High School APCS LAB 4 Parameters, apvectors, structs.
Starting Out with C++, 3 rd Edition 1 Chapter 14 – More About Classes.
suppose you had Bumblebee, Jet, and Bird classes. All three, although unrelated, implement the flying behavior, and so you could say they are each a Flyer.
Chapter 8. Operator Overloading Operator overloading gives the opportunity to redefine C++ Operator overloading refers to redefine C++ operators such.
C++ Classes & Data Abstraction
Win32 Programming Lesson 4: Classes and Structures.
Compiler Design PROJECT PRESENTATION : COMPILER FOR OBJECTIVE C Harshal Waghmare Jeet Kumar Nandan Kumar Vishal Agrawal.
CS 3800 Su 11 Beg. IOS Dev L4 Obj C part 1 CS 3800 Introduction to IOS programming Summer 2011 G. Zimmerman.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
IPhone Development Crash Course By Dylan Harris
Week 4 Recap CSE 115 Spring Formal Parameter Lists Comma-separated list of formal parameters Formal parameters are listed giving the type of the.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
C++ data types. Structs vs. Classes C++ Classes.
Class template Describing a generic class Instantiating classes that are type- specific version of this generic class Also are called parameterized types.
Intro to Objective-C Syntax: What’s most confusing about Objective-C? Most class names start with NS: NSString, NSObject Parameter lists are not comma.
Dynamic Allocation and Linked Lists. Dynamic memory allocation in C C uses the functions malloc() and free() to implement dynamic allocation. malloc is.
Objective-C Quinton Palet. Introduction  Objective-C was developed to bring large scale software development the power of the object-oriented approach.
CMSC 104, Version 8/061L18Functions1.ppt Functions, Part 1 of 4 Topics Using Predefined Functions Programmer-Defined Functions Using Input Parameters Function.
Memory Management and Automatic Reference Counting/ Copying Objects Archiving Copyright © 2012 by Yong-Gu Lee
More on Classes Inheritance Copyright © 2012 by Yong-Gu Lee
Introduction to Objective-C and Xcode (Part 2) FA 175 Intro to Mobile App Development.
Object Oriented Programming
Object Oriented Programming: Java Edition By: Samuel Robinson.
Objective C Basics. It’s C with Some Extras!  Cross Platform language  Mac  Linux/UNIX  Windows  Layer above C (Superset)  Adds Object-Oriented.
Objective-C First Part adapted from a presentation by Kevin Layer.
Object-Oriented Programming (OOP). Implementing an OOD in Java Each class is stored in a separate file. All files must be stored in the same package.
CS 11 C++ track: lecture 4 Today: More on memory management the stack and the heap inline functions structs vs. classes.
1 Introduction to Objective-C Programming (Level: Beginner) Lecture 1.
Multiple Files. Monolithic vs Modular  one file before  system includes  main driver function  prototypes  function.
1 CSC241: Object Oriented Programming Lecture No 06.
+ An Intro To Xcode By Sarah Montroy. + What is Xcode?
Objective C. Основан на C Объектно-ориентированный Использует сообщения Динамический Протоколы Интроспекция.
View Controllers Content taken from book: “iPhone SDK Development” by Bill Dudney and Chris Adamson.
Objective-C Memory management Memory management is semi-automatic: The programmer must allocate memory for objects either a) explicitly (alloc) or b) indirectly.
Course Summary Xcode & iPhone Simulator
CS 376b Introduction to Computer Vision 01 / 23 / 2008 Instructor: Michael Eckmann.
1 CSC241: Object Oriented Programming Lecture No 02.
Week 11 Multi-file Programs and Scope of Variables.
Functions: Part 2 of /11/10: Lecture 16 CMSC 104, Section 0101 John Y. Park 1.
More Objective-C Details FA 172 Intro to Mobile App Development.
Lec 5 Obj-C part 2 CS 3800 Introduction to IOS programming Lecture 5 Summer 2011.
Classes in C++ And comparison to Java CS-1030 Dr. Mark L. Hornick.
1 CSC241: Object Oriented Programming Lecture No 03.
1 Introduction to Object Oriented Programming Chapter 10.
AP Java Ch. 4 Review Question 1  Java methods can return only primitive types (int, double, boolean, etc).
Introduction to Objective-C and Xcode (Part 4) FA 175 Intro to Mobile App Development.
1 Data Structures CSCI 132, Spring 2014 Lecture 2 Classes and Abstract Data Types Read Ch Read Style Guide (see course webpage)
Classes Classes are a major feature of C++. They support – – Abstraction – Data hiding – Encapsulation – Modularity – Re-use through inheritance.
INTRODUCTION TO CLASSES & OBJECTS CREATING CLASSES USING C#
Classes CS 162 (Summer 2009). Parts of a Class Instance Fields Methods.
Static Variables. Function Scope  “Normal” local variables go out of scope and are deallocated when a function terminates.
1 C++ Classes and Data Structures Course link…..
CSIS 123A Lecture 1 Intro To Classes Glenn Stevenson CSIS 113A MSJC.
Classes C++ representation of an object
2008/11/10: Lecture 16 CMSC 104, Section 0101 John Y. Park
Class Inheritance (Cont.)
Classes & Objects: Examples
Functions, Part 2 of 3 Topics Functions That Return a Value
Introduction to Object-Oriented Programming with Java--Wu
Static is one of the modifiers that determine variable and method characteristics. The static modifier associates a variable or method with its class.
Classes C++ representation of an object
ENERGY 211 / CME 211 Lecture 17 October 29, 2008.
CS148 Introduction to Programming II
Destructors, Copy Constructors & Copy Assignment Operators
Functions, Part 2 of 3 Topics Functions That Return a Value
Destructors, Copy Constructors & Copy Assignment Operators
Functions, Part 2 of 3 Topics Functions That Return a Value
Presentation transcript:

Objective-C: Intro Michelle Alexander COMS E6998 2/4/2013

File Types Header Files –.h,.hpp (mixed Obj-c and C++) Class Files –.m,.mm (mixed Obj-c and C++) Property List –.plist

Header Files Class Definition  Base Class  Delegates implemented  Private Variables  Public Variables  Functions

Function Declaration - (void) doSomethingWithString:(NSString *)s andInt:(int)i; Return typefunction nameVariables - (int) calcSomethingWithInt:(int) i andFloat:(float)f; + – before Function Declartion: + (void) aClassMethod; - (void) anInstanceMethod;

Class Files Init function AutoRelease Dealloc Object Counters – Alloc  Dealloc – Retain  Release

Class Files (cont) Function Definitions Comments – Instance Methods Class Methods (+) – Don’t need instance of class.