OBJECTIVE C Kurt Ladendorf. General Knowledge  Super set of C  Smalltalk  Mainly used for iOS and other Apple development.

Slides:



Advertisements
Similar presentations
Lecture 3 - Writing Initializers A correct initializer must comply with the following: The initializer name should begin with init The initializer returns.
Advertisements

Black Jack in Objective-C
Software Engineering Implementation Lecture 3 ASPI8-4 Anders P. Ravn, Feb 2004.
Chapter 17 Templates. Generic Algorithms Algorithms in which the actions or steps are defined, but the data types of the items being manipulated are not.
EC-241 Object-Oriented Programming
Java Review Interface, Casting, Generics, Iterator.
C++ Classes & Data Abstraction
C/c++ 4 Yeting Ge.
Written by: Dr. JJ Shepherd
Based on examples in "Programming in Objective-C," Copyright © 2004 by Sams Publishing O BJECTIVE -C Q UICK & D IRTY.
CS 3800 Su 11 Beg. IOS Dev L4 Obj C part 1 CS 3800 Introduction to IOS programming Summer 2011 G. Zimmerman.
Objectives Introduction to Inheritance and Composition (Subclasses and SuperClasses) Overriding (and extending), and inheriting methods and constructors.
IntroductionIntroduction  Computer program: an ordered sequence of statements whose objective is to accomplish a task.  Programming: process of planning.
Mutable, Immutable, and Cloneable Objects Chapter 15.
Class template Describing a generic class Instantiating classes that are type- specific version of this generic class Also are called parameterized types.
CS 225 Java Review. Java Applications A java application consists of one or more classes –Each class is in a separate file –Use the main class to start.
UML Class Diagram: class Rectangle
8.1 Classes & Inheritance Inheritance Objects are created to model ‘things’ Sometimes, ‘things’ may be different, but still have many attributes.
1 Review: Two Programming Paradigms Structural (Procedural) Object-Oriented PROGRAM PROGRAM FUNCTION OBJECT Operations Data OBJECT Operations Data OBJECT.
C++ Yeting Ge.
Principles of Computer Programming (using Java) Review Haidong Xue Summer 2011, at GSU.
Inheritance using Java
1 Identifiers  Identifiers are the words a programmer uses in a program  An identifier can be made up of letters, digits, the underscore character (
CSE 332: C++ templates This Week C++ Templates –Another form of polymorphism (interface based) –Let you plug different types into reusable code Assigned.
Object Oriented Programming: Java Edition By: Samuel Robinson.
CS212: Object Oriented Analysis and Design Lecture 6: Friends, Constructor and destructors.
Objective-C OOP Spring OOP Conceptually the same as C++, Java, and all other object oriented languages The syntax, however… …is, well, different.
Objective-C1 CS151 Presentation: Objective C Kai Tai Pang William Sze.
Objective C. Основан на C Объектно-ориентированный Использует сообщения Динамический Протоколы Интроспекция.
 Classes in c++ Presentation Topic  A collection of objects with same properties and functions is known as class. A class is used to define the characteristics.
Abstract Classes. Review PA – 3 Design Considerations /Web/CS239/programs/pa3/draft.php ?harrisnlCS239
1 Interfaces and Abstract Classes Chapter Objectives You will be able to: Write Interface definitions and class definitions that implement them.
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 12 - Templates Outline 12.1Introduction 12.2Function Templates 12.3Overloading Template Functions.
Overview of C++ Templates
Lecture 9.4 Java Interfaces. © 2006 Pearson Addison-Wesley. All rights reserved Java does not support multiple inheritance. Interface Characteristics...
Chapter 7: Class Inheritance F Superclasses and Subclasses F Keywords: super and this F Overriding methods F The Object Class F Modifiers: protected, final.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
TEMPLATESTEMPLATES BCAS,Bapatla B.mohini devi. Templates Outline 22.1Introduction 22.2Class Templates 22.3Class Templates and Non-type Parameters 22.4Templates.
Classes, Interfaces and Packages
Quick Review of OOP Constructs Classes:  Data types for structured data and behavior  fields and methods Objects:  Variables whose data type is a class.
Written by: Dr. JJ Shepherd
Learning & Development Mobile apps for iPhone & iPad.
12-CRS-0106 REVISED 8 FEB 2013 CSG2H3 Object Oriented Programming.
POLYMORPHISM Chapter 6. Chapter Polymorphism  Polymorphism concept  Abstract classes and methods  Method overriding  Concrete sub classes and.
Classes Classes are a major feature of C++. They support – – Abstraction – Data hiding – Encapsulation – Modularity – Re-use through inheritance.
Class Diagrams Revisited. Parameterized Classes Parameterized Classes - are used to represent relationships between templates.
Structure A Data structure is a collection of variable which can be same or different types. You can refer to a structure as a single variable, and to.
Advanced Programming Practice Questions Advanced Programming. All slides copyright: Chetan Arora.
9.1 CLASS (STATIC) VARIABLES AND METHODS Defining classes is only one aspect of object-oriented programming. The real power of object-oriented programming.
Introduction to C++ programming Recap- session 1 Structure of C++ program Keywords Operators – Arithmetic – Relational – Logical Data types Classes and.
Seventh step for Learning C++ Programming CLASS Declaration Public & Private Constructor & Destructor This pointer Inheritance.
Abstract classes only used as base class from which other classes can be inherit cannot be used to instantiate any objects are incomplete Classes that.
JAVA MULTIPLE CHOICE QUESTION.
Review: Two Programming Paradigms
UML Class Diagram: class Rectangle
Templates.
Inheritance Often, software encapsulates multiple concepts for which some attributes/behaviors overlap E.g. A computer (role-playing) game has: Monsters:
null, true, and false are also reserved.
Introduction to Java Programming
Generation Gap By Kurt Rehwinkel
Inherited Classes in Java
Introduction to Programming
JavaScript Reserved Words
CLASSES AND OBJECTS.
Introduction to Classes and Objects
Programming Language C Language.
C Programming Lecture-8 Pointers and Memory Management
C++ Programming CLASS This pointer Static Class Friend Class
Data Structures and ADTs
INTERFACES Explained By: Sarbjit Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
Presentation transcript:

OBJECTIVE C Kurt Ladendorf

General Knowledge  Super set of C  Smalltalk  Mainly used for iOS and other Apple development

Data types  int, double, float, char, BOOL (YES, NO)  id  long, long long, short  Signed/unsigned  Nil

Control structures  If  Switch  For  Do while  Try catch finally

Methods  Method template:  -(void) setScore : (int) score andTime : (int) time;  Method call  [objectName setScore: 12 andTime: 47];

Arrays  Immutable  Derived from NSArray  Mutable  Derived from NSMutableArray

Array Example

Classes  Base classes normally are children of NSObject  Instance methods  Denoted by a -  Class methods  Denoted by a +

Inheritance  Single inheritance  Overriding a function  Use same function prototype and return type ChildClass : ParentClass

Instantiating Objects  Create a pointer and then call the object’s allocate and initialize methods  ClassName *foo = [[ClassName alloc] init];

Categories  Used to customize a class  Naming conflicts can arise!  Cannot add instance variables  Declaring a category ClassName (CategoryName)  Has section

Point.h Point.m

Links!  C_2.0_Essentials C_2.0_Essentials   